diff options
author | Git <git@what.cd> | 2015-12-21 08:00:28 +0000 |
---|---|---|
committer | Git <git@what.cd> | 2015-12-21 08:00:28 +0000 |
commit | 52828f71e0c3ff4e1f664241a9a7607de3302f9f (patch) | |
tree | 5206a4896dc6930663cd731bccac7219de8c91e4 | |
parent | fedceabba7526e37aaf0344657b542c0da6b15db (diff) | |
download | Gazelle-52828f71e0c3ff4e1f664241a9a7607de3302f9f.zip Gazelle-52828f71e0c3ff4e1f664241a9a7607de3302f9f.tar.gz Gazelle-52828f71e0c3ff4e1f664241a9a7607de3302f9f.tar.bz2 |
Empty commit
-rw-r--r-- | docs/CHANGES.txt | 3 | ||||
-rw-r--r-- | sections/user/user.php | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index bcd1740..e03fd11 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -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 diff --git a/sections/user/user.php b/sections/user/user.php index 6ef59a9..fffdf10 100644 --- a/sections/user/user.php +++ b/sections/user/user.php @@ -558,7 +558,19 @@ if ($Override = check_perms('users_mod') || $OwnProfile || !empty($SupportFor)) ?></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> <? |