summaryrefslogtreecommitdiffstats
path: root/modules/register.inc.php
blob: ca5f4bf5c7d11f3d57696ab124ed98c3e6cfb8d8 (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
<?php

class Page_Register extends Page
{

	protected function doPreprocess()
	{
		User::load();
		if (User::isInDatabase()) {
			Message::addWarning('Sie haben sich bereits für bwLehrpool registriert');
			Util::redirect('?do=Main');
		}
		if (!User::isShibbolethAuth())
			Util::redirect('/secure-all/?do=Main');
		if (Request::post('agb') === 'on') {
			// Put stuff in DB
			User::deploy(Request::post('share') !== 'on');
			Message::addSuccess('Ihr Konto wurde freigeschaltet');
			Util::redirect('?do=Main');
		}
		Message::addError('Sie müssen den Nutzungsbedingungen zustimmen');
		Util::redirect('?do=Main');
	}

}