X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/0d9c3baea2fb27d3956258e6911ac9439d63effa..v3.4-0-g72d8db8c87:/login/list.php?ds=sidebyside diff --git a/login/list.php b/login/list.php index 5c551f3..0d9eec2 100644 --- a/login/list.php +++ b/login/list.php @@ -8,14 +8,28 @@ foreach ($users as $col => $userdir) { $users[$col] = new User($userdir); } +if (@$Place['order'] == 'seen') { + $order = array_map(function ($col) { return $col->seen; }, $users); +# $order = array_column($users, 'seen'); #TODO php7 simplification + array_multisort($order, SORT_DESC, SORT_NUMERIC, $users); + $users = array_intersect_key($users, array_filter($order)); +} + +if (isset($Place['n'])) { + array_splice($users, $Place['n']); # limit number of results +} + print '