summaryrefslogtreecommitdiff
path: root/src/controllers
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 03:15:03 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 03:15:03 -0400
commit89c35c47f375d5b45e1e219327600b5bba5569f1 (patch)
tree1c3f97eb85a31e5f008f81f8106b27f1eaf8444c /src/controllers
parentf21d82c9eff383d2c1c45c94af5f6c355e3258b2 (diff)
Begin adding a userlist visable to non-authenticated users.
Diffstat (limited to 'src/controllers')
-rw-r--r--src/controllers/Users.class.php29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/controllers/Users.class.php b/src/controllers/Users.class.php
index a4403e3..f7dc604 100644
--- a/src/controllers/Users.class.php
+++ b/src/controllers/Users.class.php
@@ -417,18 +417,27 @@ class Users extends Controller {
return array('key'=>$key, 'name'=>$name);
}
private function getIndexAttribs() {
+ $user = Auth::getObj(Login::isLoggedIn());
+
$attribs = array();
- $attribs[] = $this->attrib('auth_user', 'Active');
- if (Auth::getObj(Login::isLoggedIn())->isAdmin()) {
- $attribs[] = $this->attrib('auth_admin', 'Admin');
- $attribs[] = $this->attrib('auth_delete', 'Delete');
+ if ($user->isUser()) {
+ $attribs[] = $this->attrib('auth_uid', 'UID');
+ $attribs[] = $this->attrib('auth_user', 'Active');
+ if ($user->isAdmin()) {
+ $attribs[] = $this->attrib('auth_admin', 'Admin');
+ $attribs[] = $this->attrib('auth_delete', 'Delete');
+ }
+ $attribs[] = $this->attrib('lastname','Last');
+ $attribs[] = $this->attrib('firstname','First');
+ $attribs[] = $this->attrib('hsclass','Class of');
+ $attribs[] = $this->attrib('phone','Phone number');
+ $attribs[] = $this->attrib('email','Email');
+ } else {
+ $attribs[] = $this->attrib('auth_uid', 'UID');
+ $attribs[] = $this->attrib('lastname','Last');
+ $attribs[] = $this->attrib('firstname','First');
+ $attribs[] = $this->attrib('auth_name', 'Username');
}
- $attribs[] = $this->attrib('lastname','Last');
- $attribs[] = $this->attrib('firstname','First');
- $attribs[] = $this->attrib('hsclass','Class of');
- $attribs[] = $this->attrib('phone','Phone number');
- $attribs[] = $this->attrib('email','Email');
- $attribs[] = $this->attrib('auth_name', 'Username');
return $attribs;
}