From 1b0ed5ab50320760b5d48745cf7a3670bdc99869 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <ericrasmussen1@gmail.com>
Date: Thu, 19 Jul 2012 12:41:49 -0500
Subject: [PATCH] [gh-422] Add a description for the search and make labels
 user-specific

---
 sites/all/modules/unl/unl_site_creation.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sites/all/modules/unl/unl_site_creation.php b/sites/all/modules/unl/unl_site_creation.php
index e516448ad..da2dc10c9 100644
--- a/sites/all/modules/unl/unl_site_creation.php
+++ b/sites/all/modules/unl/unl_site_creation.php
@@ -1023,6 +1023,7 @@ function unl_user_audit($form, &$form_state) {
   $form['username'] = array(
     '#type' => 'textfield',
     '#title' => t('Username'),
+    '#description' => t('Will match a partial username. For example "smith" will match both jsmith2 and rsmithson1.'),
     '#required' => TRUE,
   );
 /*$form['ignore_shared_roles'] = array(
@@ -1064,14 +1065,16 @@ function _unl_get_user_audit_content($username) {
        '',
     );
     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) {
     $header = array(
       t('Site'),
-      t('Role (User)'),
+      t('Role') . ($GLOBALS['user']->name != $username ? ' (' . t('User') . ')' : ''),
     );
     $content = array(
       '#theme' => 'table',
-- 
GitLab