From: joshuaruesweg Date: Sat, 31 Oct 2020 20:37:53 +0000 (+0100) Subject: Sort active sessions by last activity time X-Git-Tag: 5.4.0_Alpha_1~656^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d841ab4595b28b9fd9a516379634489d368704d;p=GitHub%2FWoltLab%2FWCF.git Sort active sessions by last activity time --- diff --git a/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php b/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php index 5a9fc2b49a..5b70f656d2 100644 --- a/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php +++ b/wcfsetup/install/files/lib/page/AccountSecurityPage.class.php @@ -32,6 +32,10 @@ class AccountSecurityPage extends AbstractPage { parent::readData(); $this->activeSessions = SessionHandler::getInstance()->getUserSessions(WCF::getUser()); + + usort($this->activeSessions, function ($a, $b) { + return $b->getLastActivityTime() <=> $a->getLastActivityTime(); + }); } /**