diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-04-01 20:01:57 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-04-01 20:01:57 +0400 |
commit | c5a8686a60da743f750e89a342b7ce1e30ea9865 (patch) | |
tree | 3a6e9bec7d09a320da92861418cd2c9bac6f3639 /plugins/UsersManager/Controller.php | |
parent | d41fe2ae92d734b78d67e43335b839b66fb20def (diff) |
Fixes #4912, fix regressions in UsersManager/index.twig that resulted from last seen column addition: do not loop w/ reference when var w/ same name is used below, add extra blank cell for add new user row and remove erroneous condition in LastSeenTimeLogger. Thanks to @tassoman for research into first two issues.
Diffstat (limited to 'plugins/UsersManager/Controller.php')
-rw-r--r-- | plugins/UsersManager/Controller.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php index 9f3f8047b4..cd882cfd49 100644 --- a/plugins/UsersManager/Controller.php +++ b/plugins/UsersManager/Controller.php @@ -84,12 +84,12 @@ class Controller extends \Piwik\Plugin\ControllerAdmin $view->showLastSeen = true; $users = APIUsersManager::getInstance()->getUsers(); - foreach ($users as &$user) { + foreach ($users as $index => $user) { $usersAliasByLogin[$user['login']] = $user['alias']; $lastSeen = LastSeenTimeLogger::getLastSeenTimeForUser($user['login']); - $user['last_seen'] = $lastSeen == 0 - ? false : MetricsFormatter::getPrettyTimeFromSeconds(time() - $lastSeen); + $users[$index]['last_seen'] = $lastSeen == 0 + ? false : MetricsFormatter::getPrettyTimeFromSeconds(time() - $lastSeen); } if (Piwik::hasUserSuperUserAccess()) { |