summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index e2b7e43..3325421 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -76,6 +76,16 @@ class User
{
return isset(self::$user['role']) && self::$user['role'] === 'tutor';
}
+
+ public static function isAdmin()
+ {
+ // TODO: Not hardcoded; per Institution...
+ return in_array(self::getShibId(), array(
+ '5fb22037697816a70a847d15245c9f88',
+ '94e48d34587ab9963a2013ddc97e1e45',
+ 'fb91f270a95a5b006be916f2b2da305c',
+ ), true);
+ }
public static function getOrganizationId()
{
@@ -111,6 +121,13 @@ class User
}
return self::$organization;
}
+
+ public static function getShibId()
+ {
+ if (empty(self::$user['shibid']))
+ return false;
+ return self::$user['shibid'];
+ }
public static function load()
{