summaryrefslogtreecommitdiffstats
path: root/modules/main.inc.php
blob: ed92bd202f7e25a7d2feb661931b81b42b3aee40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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());
			}
		}
	}

}