Sort last online users by time rather than random.
This commit is contained in:
parent
514f7c4513
commit
81e16bfad1
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ $onlineUsers = cache_get('index:online_users:v1', function () {
|
|||
LEFT JOIN `msz_roles` as r
|
||||
ON r.`role_id` = u.`display_role`
|
||||
WHERE u.`user_active` >= DATE_SUB(NOW(), INTERVAL 5 MINUTE)
|
||||
ORDER BY RAND()
|
||||
ORDER BY u.`user_active` DESC
|
||||
LIMIT 104
|
||||
')->fetchAll(PDO::FETCH_ASSOC);
|
||||
}, 30);
|
||||
|
|
Loading…
Reference in a new issue