summaryrefslogtreecommitdiff
path: root/src/lib/Auth.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Auth.class.php')
-rw-r--r--src/lib/Auth.class.php5
1 files changed, 5 insertions, 0 deletions
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() {