summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2024-05-27 15:37:55 +0200
committerSimon Rettberg2024-05-27 15:37:55 +0200
commit43ddb14693e4a4830f471dd7c90f6257d95b7b29 (patch)
tree8c960b53e0f7ba1c660d16abf8bf044411b96080 /inc/user.inc.php
parentMerge branch 'master' of git.openslx.org:bwlp/bwlp-webadmin (diff)
downloadbwlp-webadmin-master.tar.gz
bwlp-webadmin-master.tar.xz
bwlp-webadmin-master.zip
Add support for client login via QRCodeHEADmaster
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php10
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];