diff options
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r-- | inc/user.inc.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php index 9520640..84e517d 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -161,6 +161,7 @@ class User . ' an den {{1}}-SP zu übermitteln. Bitte wenden Sie sich an den Support.', CONFIG_IDM, CONFIG_SUITE); } Session::delete(); + file_put_contents('/tmp/shib-load-' . time() . '-' . $_SERVER['REMOTE_ADDR'] . '.txt', print_r($_SERVER, true)); return false; } // Try user from local DB @@ -209,14 +210,7 @@ class User 'email' => $_SERVER['mail'], ); // Figure out whether the user should be considered a tutor - if (isset($_SERVER[CONFIG_SCOPED_AFFILIATION]) && (strpos(";{$_SERVER[CONFIG_SCOPED_AFFILIATION]}", ';employee@') !== false - || strpos(";{$_SERVER[CONFIG_SCOPED_AFFILIATION]}", ';staff@') !== false - || strpos(";{$_SERVER[CONFIG_SCOPED_AFFILIATION]}", ';faculty@') !== false)) - self::$user['role'] = 'TUTOR'; - elseif (isset($_SERVER['entitlement']) && strpos(";{$_SERVER['entitlement']};", CONFIG_ENTITLEMENT) !== false) - self::$user['role'] = 'TUTOR'; - else - self::$user['role'] = 'STUDENT'; + self::$user['role'] = Util::getRole(); // Try to figure out organization if (isset($_SERVER[CONFIG_EPPN]) && preg_match('/@([0-9a-zA-Z\-._]+)$/', $_SERVER[CONFIG_EPPN], $out)) { self::$user['organization'] = $out[1]; |