From db0225db8ff4993e4c91024a42b002ba3c813564 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 19 Oct 2016 10:46:20 +0200 Subject: Handle missing meta data from IdP when logging in via api --- inc/user.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/user.inc.php b/inc/user.inc.php index 16ec77d..70a6cdb 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -200,7 +200,8 @@ class User ); // Figure out whether the user should be considered a tutor if (isset($_SERVER['affiliation']) && (strpos(";{$_SERVER['affiliation']}", ';employee@') !== false - || strpos(";{$_SERVER['affiliation']}", ';staff@') !== false)) + || strpos(";{$_SERVER['affiliation']}", ';staff@') !== false + || strpos(";{$_SERVER['affiliation']}", ';faculty@') !== false)) self::$user['role'] = 'TUTOR'; elseif (isset($_SERVER['entitlement']) && strpos(";{$_SERVER['entitlement']};", ';http://bwidm.de/entitlement/bwLehrpool;') !== false) self::$user['role'] = 'TUTOR'; -- cgit v1.2.3-55-g7522