diff options
-rw-r--r-- | src/controllers/Users.class.php | 15 | ||||
-rw-r--r-- | src/views/pages/users/index.html.php | 1 | ||||
-rw-r--r-- | src/views/pages/users/individual.html.php | 6 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/controllers/Users.class.php b/src/controllers/Users.class.php index 9978ef8..b75848f 100644 --- a/src/controllers/Users.class.php +++ b/src/controllers/Users.class.php @@ -87,17 +87,20 @@ class Users extends Controller { $db = Database::getInstance(); $pm = PluginManager::getInstance(); - $username = implode('/', $remainder); - if ($username == 'all') { + $usernames = implode('/', $remainder); + $uids = array(); + if ($usernames == 'all') { $uids = $db->listUsers(); } else { - $uids = array($db->getUID($username)); + foreach (explode('!', $usernames) as $username) { + $uids[] = $db->getUID($username); + } } - + $vars = array(); if (count($uids)<2) { - $user = Auth::getInstance($uid); + $user = Auth::getInstance($uids[0]); if ($user->isGroup()) $uid = false; // ignore groups. @@ -129,7 +132,7 @@ class Users extends Controller { foreach ($uids as $uid) { $vars['users'][] = Auth::getInstance($uid); } - $vars['username'] = $username; + $vars['usernames'] = $usernames; $vars['config_options'] = $config_options; $vars['groups'] = $db->listGroupNames(); require_once('ContactMethod.class.php'); diff --git a/src/views/pages/users/index.html.php b/src/views/pages/users/index.html.php index 159ff76..dfeff15 100644 --- a/src/views/pages/users/index.html.php +++ b/src/views/pages/users/index.html.php @@ -7,6 +7,7 @@ require_once('Login.class.php'); $t->header('Users'); $t->paragraph($t->link($t->url('users.csv'), "Download this as a spreadsheet.", true)); +$t->paragraph($t->link($t->url('users/all'), "See details for all users.")); $t->openTag('form', array('action'=>$t->url('users/index'), 'method'=>'post')); diff --git a/src/views/pages/users/individual.html.php b/src/views/pages/users/individual.html.php index 39360b7..1ca346e 100644 --- a/src/views/pages/users/individual.html.php +++ b/src/views/pages/users/individual.html.php @@ -1,7 +1,7 @@ <?php global $VARS, $CONTACT_METHODS; $t = $VARS['template']; $users = $VARS['users']; -$username = $VARS['username']; +$usernames = $VARS['usernames']; function inputText($user, $key, $label, $hint='') { global $VARS; $t = $VARS['template']; @@ -58,9 +58,9 @@ function inputField($user, $arr) { //////////////////////////////////////////////////////////////////////////////// if (count($users)>1) { - $t->header("Users: $username"); + $t->header("Users: $usernames"); } else { - $t->header("User: $username"); + $t->header("User: $usernames"); } foreach($users as $user) { |