mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-06 10:00:58 +00:00
check if user has a pwd expiration before outputing it
This commit is contained in:
parent
59fedbbcc0
commit
01f210ad43
|
@ -112,13 +112,18 @@ class SeedDMS_View_UserList extends SeedDMS_Theme_Style {
|
|||
echo "<td>";
|
||||
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').")";
|
||||
$tmp = $currUser->getPwdExpiration();
|
||||
if($tmp) {
|
||||
$expdate = new DateTime($tmp);
|
||||
$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");
|
||||
}
|
||||
} else {
|
||||
printMLText("password_expired");
|
||||
printMLText("password_never_expires");
|
||||
}
|
||||
}
|
||||
$sessions = $sessionmgr->getUserSessions($currUser, 10);
|
||||
|
|
Loading…
Reference in New Issue
Block a user