Module Logged-in Users is not sorted well.
We have to look at the date and time in each row to find out who logged in most recently.
It will be more difficult if there are many users logged in.
I suggest to add an "descending Order" at the getList function (line 50) in this file administrator/modules/mod_logged/src/Helper/LoggedHelper.php
So it will be like this:
$query = $db->getQuery(true)
->select('s.time, s.client_id, u.id, u.name, u.username')
->from('#__session AS s')
->join('RIGHT', '#__users AS u ON s.userid = u.id')
->where('s.guest = 0')
->order('s.time DESC')
->setLimit($params->get('count', 5), 0);
By adding ->order('s.time DESC')
in the query, the list in the module will be sorted by datetime in descending order, so Admin can find out more quickly which users have logged in recently in sequence.
It would be more interesting if there is an option to sort by name/username or by datetime in ascending or descending order.
J5.3.2!
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Feature
|