diff options
Diffstat (limited to 'src/controllers')
-rw-r--r-- | src/controllers/Users.class.php | 29 |
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; } |