Forum Discussion
peterlu
8 years agoChampion
Suchith you can use API V2 to pull a user list based on last_visited_date, eg.
SELECT login, avatar, view_href FROM users WHERE last_visit_time > 2017-12-25T10:04:30+10:00 LIMIT 30
Happy Xmas
SELECT login, avatar, view_href FROM users WHERE last_visit_time > 2017-12-25T10:04:30+10:00 LIMIT 30
Happy Xmas
Suchith
8 years agoAce
Hi Peterlu,
User collections doesn't support last_visit_attribute to use as a constraint.
Thanks,
Suchith
- peterlu8 years agoChampion
SuchithI guess your use case is to list recent active users. There may be some work around. Eg. You can create a hidden board and create an admin post. And create a meta field for the post to store user id. I think there is a Lithium trigger, when user login every time, it can poke to a endpoint. In the endpoint you can create replies to this post with the user id. Then you can use the API V2 message object to query the recent posts for recent users.
Or post a Lithium idea to ask Lithium to add the last_visited_time as a WHERE constrain :)
Related Content
- 8 years ago