summaryrefslogtreecommitdiffstats
path: root/modules/main.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-10-14 16:57:54 +0200
committerSimon Rettberg2015-10-14 16:57:54 +0200
commit8eee10ead8906df04255d275b460a78cc90c4e12 (patch)
tree66f1c6426ca9404e5309dd34225755fac330f138 /modules/main.inc.php
parentAdapt to master-server changes (Db scheme) (diff)
downloadbwlp-webadmin-8eee10ead8906df04255d275b460a78cc90c4e12.tar.gz
bwlp-webadmin-8eee10ead8906df04255d275b460a78cc90c4e12.tar.xz
bwlp-webadmin-8eee10ead8906df04255d275b460a78cc90c4e12.zip
Fix session handling, support staff-affiliation as being detected as tutor
Diffstat (limited to 'modules/main.inc.php')
-rw-r--r--modules/main.inc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/main.inc.php b/modules/main.inc.php
index 2581a59..8873b12 100644
--- a/modules/main.inc.php
+++ b/modules/main.inc.php
@@ -34,6 +34,9 @@ class Page_Main extends Page
$this->renderShibbolethRegistered();
return;
}
+ if (!User::isTutor()) {
+ return;
+ }
// User is not in DB, so he might want so sign up for the service - see if conditions are met
if (User::getOrganization() !== false) {
// Organization is known, show signup form
@@ -67,11 +70,11 @@ class Page_Main extends Page
$data['testacc'] = true;
$mail = trim(User::getMail());
if (!empty($mail)) {
- $existing = Database::queryFirst('SELECT login FROM user WHERE email = :email LIMIT 1', array(
+ $existing = Database::queryFirst('SELECT userid FROM user WHERE email = :email LIMIT 1', array(
'email' => $mail
));
if ($existing !== false) {
- $data['testlogin'] = $existing['login'];
+ $data['testlogin'] = $existing['userid'];
}
}
}