From ad4a7ff9159c2c64cea98d7189f46fa7d6174fc2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Sep 2011 21:13:47 -0400 Subject: Screw it, I'm tired of trying to break this into individual commits --- src/lib/Auth.class.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/Auth.class.php') diff --git a/src/lib/Auth.class.php b/src/lib/Auth.class.php index 4c2a9c6..e49ebf7 100644 --- a/src/lib/Auth.class.php +++ b/src/lib/Auth.class.php @@ -26,6 +26,11 @@ class Auth { return $type; } protected function setType($type) { + $logged_in_uid = $this->mm->isLoggedIn(); + $logged_in_obj = $this->mm->getAuthObj($logged_in_uid); + $is_admin = $logged_in_obj->isAdmin(); + if (!$is_admin) return false; + return $this->mm->setStatus($this->uid, $type); } public function isUser() { -- cgit v1.2.3-54-g00ecf