Feature No Code Attached Yet
avatar samuelagus
samuelagus
4 Sep 2025

Is your feature request related to a problem? Please describe.

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.

Describe the solution you'd like

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.

Additional context

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!

avatar samuelagus samuelagus - open - 4 Sep 2025
avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Sep 2025
avatar samuelagus samuelagus - change - 4 Sep 2025
The description was changed
avatar samuelagus samuelagus - edited - 4 Sep 2025
avatar samuelagus samuelagus - change - 4 Sep 2025
The description was changed
avatar samuelagus samuelagus - edited - 4 Sep 2025
avatar alikon alikon - change - 4 Sep 2025
Labels Added: Feature
avatar alikon alikon - labeled - 4 Sep 2025

Add a Comment

Login with GitHub to post a comment