summaryrefslogtreecommitdiff
path: root/demos/personal/protected/Pages/UserLogin.php
blob: ce6531796a3325174564331d4cc2bbb0cb526658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

class UserLogin extends TPage
{
	public function login($sender,$param)
	{
		$manager=$this->Application->getModule('auth');
		if(!$manager->login($this->Username->Text,$this->Password->Text))
			$param->IsValid=false;
	}

	public function onLoadComplete($param)
	{
		parent::onLoadComplete($param);
		if($this->IsPostBack && $this->IsValid)
			$this->Response->redirect($this->Application->getModule('auth')->getReturnUrl());
	}
}

?>