summaryrefslogtreecommitdiffstats
path: root/modules/main.inc.php
diff options
context:
space:
mode:
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'];
}
}
}