Order get_users() by last login date. Is it possible?


I want to create a page that displays all the blog users ordered by the last login date.

I’ve tried with the get_users() function and I can succesfully get the users’ list, but not in the order I want:

$query = get_users('&offset='.$offset.'&orderby=login&order=DESC&number='.$number); 

I think that the orderby=login is not what I’m looking for…
Is there any other way to accomplish this?

stefano1 2 years 2020-11-02T17:10:33-05:00 0 Answers 14 views 0

Leave an answer