diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index ed45eb44d..7406b2d21 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -37,6 +37,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { $allUsers = $this->params['allusers']; $httproot = $this->params['httproot']; $quota = $this->params['quota']; + $pwdexpiration = $this->params['pwdexpiration']; $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); @@ -44,10 +45,12 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { $this->pageNavigation("", "admin_tools"); $this->contentHeading(getMLText("user_list")); $this->contentContainerStart(); + + $sessionmgr = new SeedDMS_SessionMgr($dms->getDB()); ?> - + "; @@ -94,6 +97,25 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { } echo ""; echo ""; + echo "
"; + if($pwdexpiration) { + $now = new DateTime(); + $expdate = new DateTime($currUser->getPwdExpiration()); + $diff = $now->diff($expdate); + if($expdate > $now) { + printf(getMLText('password_expires_in_days'), $diff->format('%a')); + echo " (".$expdate->format('Y-m-d H:i:sP').")"; + } else { + printMLText("password_expired"); + } + } + $sessions = $sessionmgr->getUserSessions($currUser); + if($sessions) { + foreach($sessions as $session) { + echo "
".getMLText('lastaccess').": ".getLongReadableDate($session->getLastAccess()); + } + } + echo "
"; echo "
"; echo "getID()."\"> "; echo "getID()."\">";