Skip to content

Commit

Permalink
Show pass last changed date in admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcwilson committed May 12, 2024
1 parent c1b6aba commit db4bb1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions admin/includes/functions/admin_access.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ function zen_get_users($limit = null): array
'email' => $row['admin_email'],
'profile' => $row['admin_profile'],
'profileName' => $row['profile_name'],
'pwd_last_change_date' => $row['pwd_last_change_date'],
];
}
return $retVal;
Expand Down
1 change: 1 addition & 0 deletions admin/includes/languages/english/lang.users.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'TEXT_ADMIN_PROFILE' => 'Profile',
'TEXT_CHOOSE_PROFILE' => 'Choose Profile',
'TEXT_NO_USERS_FOUND' => 'No Admin Users found',
'TEXT_PASS_LAST_CHANGED' => 'Pwd Last Change',
'TEXT_CONFIRM_DELETE' => 'Delete requested. Please confirm: ',
'ERROR_NO_USER_DEFINED' => 'The option requested requires a username to be specified.',
'ERROR_USER_MUST_HAVE_PROFILE' => 'User must be assigned a profile.',
Expand Down
3 changes: 3 additions & 0 deletions admin/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
<th class="name"><?php echo TEXT_ADMIN_NAME ?></th>
<th class="email"><?php echo TEXT_EMAIL ?></th>
<th class="profile"><?php echo TEXT_ADMIN_PROFILE ?></th>
<th class="changed"><?php echo TEXT_PASS_LAST_CHANGED ?></th>
<?php if ($action == 'add' || $action == 'password') { ?>
<th class="password"><?php echo TEXT_PASSWORD ?></th>
<th class="password"><?php echo TEXT_CONFIRM_PASSWORD ?></th>
Expand All @@ -146,6 +147,7 @@
<td class="name"><?php echo zen_draw_input_field('name', isset($_POST['name']) ? $_POST['name'] : '', 'class="form-control" autofocus autocomplete="off"', true, 'text', true) ?></td>
<td class="email"><?php echo zen_draw_input_field('email', isset($_POST['email']) ? $_POST['email'] : '', 'class="form-control" autocomplete="off"', true, 'email', true) ?></td>
<td class="profile"><?php echo zen_draw_pull_down_menu('profile', $profilesList, isset($_POST['profile']) ? $_POST['profile'] : '', 'class="form-control"', true) ?></td>
<td class="changed"></td>
<td class="password"><?php echo zen_draw_input_field('password', isset($_POST['password']) ? $_POST['password'] : '', 'class="form-control" autocomplete="off"', true, 'password'); ?></td>
<td class="confirm"><?php echo zen_draw_input_field('confirm', isset($_POST['confirm']) ? $_POST['confirm'] : '', 'class="form-control" autocomplete="off"', true, 'password'); ?></td>
<td class="actions">
Expand Down Expand Up @@ -173,6 +175,7 @@
<?php } else { ?>
<td class="profile"><?php echo $userDetails['profileName'] ?></td>
<?php } ?>
<td class="changed"><?php echo zen_date_short($userDetails['pwd_last_change_date']); ?></td>
<?php if ($action == 'password' && $user == $userDetails['id']) { ?>
<td class="password"><?php echo zen_draw_input_field('password', '', 'class="form-control"', true, 'password', true) ?></td>
<td class="confirm"><?php echo zen_draw_input_field('confirm', '', 'class="form-control"', true, 'password', true) ?></td>
Expand Down

0 comments on commit db4bb1a

Please sign in to comment.