Empty commit

This commit is contained in:
Git 2015-12-21 08:00:28 +00:00
parent fedceabba7
commit 52828f71e0
2 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,8 @@
CHANGE LOG
2015-12-20 by newman
Add password age to user profiles
2015-12-18 by newman
Add override option in check_perms() for overriding $MinClass

View File

@ -558,7 +558,19 @@ function check_paranoia_here($Setting) {
?></li>
<?
}
if ($OwnProfile || check_perms('users_mod')) {
$DB->query("SELECT MAX(uhp.ChangeTime), ui.JoinDate
FROM users_info ui
LEFT JOIN users_history_passwords uhp ON uhp.UserID = $UserID
WHERE ui.UserID = $UserID");
list($PasswordHistory, $JoinDate) = G::$DB->next_record();
$Age = (empty($PasswordHistory)) ? time_diff($JoinDate) : time_diff($PasswordHistory);
$PasswordAge = substr($Age, 0, strpos($Age, " ago"));
?>
<li>Password age: <?=$PasswordAge?></li>
<? } ?>
</ul>
</div>
<?