summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2015-04-23 17:40:24 +0200
committerSimon Rettberg2015-04-23 17:40:24 +0200
commit47517c76094834d582121b84098c84c0bcb8353f (patch)
tree2d2d174956b0174e645ef246bb78ba1c683885b6 /inc
parent+AGB, +DeleteUser feature (diff)
downloadbwlp-webadmin-47517c76094834d582121b84098c84c0bcb8353f.tar.gz
bwlp-webadmin-47517c76094834d582121b84098c84c0bcb8353f.tar.xz
bwlp-webadmin-47517c76094834d582121b84098c84c0bcb8353f.zip
Add AddUser mask for creating test accounts
Diffstat (limited to 'inc')
-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()
{