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

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

	public function loginButtonClicked($sender,$param)
	{
		if($this->Page->IsValid)
			$this->Response->redirect($this->Application->getModule('auth')->getReturnUrl());
	}
}

?>