David
1
Hey,
i try to filter all users by there modified date.
I need all users which are modifiedyesterday. How can a do that?
i tried the following:
$current_date = date('Y-m-d', strtotime('-1 day'));
$timestamp = strtotime($current_date . ' 01:00:00');
$benutzer = kirby()->users()->filterBy('modified'.'date >',$timestamp);
thanks in advance.
texnixe
2
There’s a syntax error, dot instead of comma after ‘modified’
David
3
Thank you, but even with this correction i don’t get any user.
i know that there are at least 3 new users within the last day.
texnixe
4
Also, since you are filtering by timestamp, remove the date filter:
$benutzer = kirby()->users()->filterBy('modified', '>', $timestamp);