Ignore:
Timestamp:
Jan 5, 2014, 4:47:51 PM (11 years ago)
Author:
chronos
Message:
  • Fixed: If user is logged from multiple sites then show him only once in online user list.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/User.php

    r713 r714  
    4242        {
    4343                $Output = T('Online translators').':<br />';
    44                 $DbResult = $this->System->Database->query('SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '.
     44                $DbResult = $this->System->Database->query('SELECT * FROM ('.
     45'SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '.
    4546                                'JOIN `User` ON `User`.`ID` = `UserOnline`.`User` '.
    46                                 'WHERE (`ActivityTime` >= NOW() - 300) ');
     47                                'WHERE (`ActivityTime` >= NOW() - 300) '.
     48                                'ORDER BY `ActivityTime` DESC ) AS `T` GROUP BY `Name`');
    4749                while($DbUser = $DbResult->fetch_assoc())
    4850                {
Note: See TracChangeset for help on using the changeset viewer.