summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2020-06-25 12:57:57 +0200
committerSimon Rettberg2020-06-25 12:57:57 +0200
commit269f463f1612f9dd8fc22bb329993604f29fe139 (patch)
treedbac08f2737cedbf90660823d72262b57f0ec12f /inc
parentRefine old/test account merging logic (diff)
downloadbwlp-webadmin-269f463f1612f9dd8fc22bb329993604f29fe139.tar.gz
bwlp-webadmin-269f463f1612f9dd8fc22bb329993604f29fe139.tar.xz
bwlp-webadmin-269f463f1612f9dd8fc22bb329993604f29fe139.zip
Make surname and eppn configurable
Diffstat (limited to 'inc')
-rw-r--r--inc/user.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 6e3c06d..e2523f9 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -181,8 +181,8 @@ class User
Util::redirect('?do=Main&force-cookie=true.dat');
}
self::$isShib = true;
- if (!isset($_SERVER['sn']))
- $_SERVER['sn'] = '';
+ if (!isset($_SERVER[CONFIG_SURNAME]))
+ $_SERVER[CONFIG_SURNAME] = '';
if (!isset($_SERVER['givenName']))
$_SERVER['givenName'] = '';
if (!isset($_SERVER['mail']))
@@ -192,7 +192,7 @@ class User
'userid' => NULL,
'shibid' => $shibId,
'firstname' => $_SERVER['givenName'],
- 'lastname' => $_SERVER['sn'],
+ 'lastname' => $_SERVER[CONFIG_SURNAME],
'email' => $_SERVER['mail'],
);
// Figure out whether the user should be considered a tutor
@@ -205,7 +205,7 @@ class User
else
self::$user['role'] = 'STUDENT';
// Try to figure out organization
- if (isset($_SERVER['eppn']) && preg_match('/@([0-9a-zA-Z\-\._]+)$/', $_SERVER['eppn'], $out)) {
+ if (isset($_SERVER[CONFIG_EPPN]) && preg_match('/@([0-9a-zA-Z\-\._]+)$/', $_SERVER[CONFIG_EPPN], $out)) {
self::$user['organization'] = $out[1];
}
if (!isset(self::$user['organization']) && isset($_SERVER['affiliation']) && preg_match('/@([0-9a-zA-Z\-\._]+)(;|$)/', $_SERVER['affiliation'], $out)) {