summaryrefslogtreecommitdiff
path: root/src/controllers
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 18:52:17 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 18:52:17 -0400
commitdb4376c0c1d5d2ea72696e6d73b469cb2dc30b91 (patch)
treed0e77f04664a5db2beb7286457be8d04703a8703 /src/controllers
parent51226909b3f371245485b29b84a32aa1013a79b0 (diff)
Add parsing of the ! separator to user page URLs.
Diffstat (limited to 'src/controllers')
-rw-r--r--src/controllers/Users.class.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/controllers/Users.class.php b/src/controllers/Users.class.php
index 447a70f..a1ad2fe 100644
--- a/src/controllers/Users.class.php
+++ b/src/controllers/Users.class.php
@@ -87,17 +87,20 @@ class Users extends Controller {
$db = $mm->database();
$pm = $mm->pluginManager();
- $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::getObj($uid);
+ $user = Auth::getObj($uids[0]);
if ($user->isGroup()) $uid = false; // ignore groups.
@@ -129,7 +132,7 @@ class Users extends Controller {
foreach ($uids as $uid) {
$vars['users'][] = Auth::getObj($uid);
}
- $vars['username'] = $username;
+ $vars['usernames'] = $usernames;
$vars['config_options'] = $config_options;
$vars['groups'] = $db->listGroupNames();
require_once('ContactMethod.class.php');