Skip to content
Snippets Groups Projects
Commit 1b0ed5ab authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

[gh-422] Add a description for the search and make labels user-specific

parent 4820f125
No related branches found
No related tags found
No related merge requests found
...@@ -1023,6 +1023,7 @@ function unl_user_audit($form, &$form_state) { ...@@ -1023,6 +1023,7 @@ function unl_user_audit($form, &$form_state) {
$form['username'] = array( $form['username'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Username'), '#title' => t('Username'),
'#description' => t('Will match a partial username. For example "smith" will match both jsmith2 and rsmithson1.'),
'#required' => TRUE, '#required' => TRUE,
); );
/*$form['ignore_shared_roles'] = array( /*$form['ignore_shared_roles'] = array(
...@@ -1064,14 +1065,16 @@ function _unl_get_user_audit_content($username) { ...@@ -1064,14 +1065,16 @@ function _unl_get_user_audit_content($username) {
'', '',
); );
foreach ($site['roles'] as $role => $user) { foreach ($site['roles'] as $role => $user) {
$audit_map[$site_id][1] .= "$role ($user) <br />"; $audit_map[$site_id][1] .= "$role ";
$audit_map[$site_id][1] .= ($GLOBALS['user']->name != $username ? "($user)" : '');
$audit_map[$site_id][1] .= "<br />";
} }
} }
if (count($audit_map) > 0) { if (count($audit_map) > 0) {
$header = array( $header = array(
t('Site'), t('Site'),
t('Role (User)'), t('Role') . ($GLOBALS['user']->name != $username ? ' (' . t('User') . ')' : ''),
); );
$content = array( $content = array(
'#theme' => 'table', '#theme' => 'table',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment