diff options
Diffstat (limited to 'modules/main.inc.php')
-rw-r--r-- | modules/main.inc.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/main.inc.php b/modules/main.inc.php new file mode 100644 index 0000000..ed92bd2 --- /dev/null +++ b/modules/main.inc.php @@ -0,0 +1,29 @@ +<?php + +class Page_Main extends Page +{ + + protected function doPreprocess() + { + User::load(); + } + + protected function doRender() + { + Render::addTemplate('main/_page', array( + 'user' => User::getLastName(), + )); + if (User::isLoggedIn()) { + // Logged in user -- + if (User::getOrganization() !== false) { + // Organization is known, show signup form + if (User::isShibbolethAuth() && !User::isInDatabase()) { + Render::addTemplate('main/deploy'); + } + } else if (User::getRemoteOrganizationId() !== false) { + Message::addWarning('Ihre Hochschule/Einrichtung {{0}} ist leider nicht bekannt. Bitte kontaktieren Sie den Support.', User::getRemoteOrganizationId()); + } + } + } + +} |