summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Portlets/LoginPortlet.php
blob: 0085c17fb212d8d68bfc9913c0263a6b1201f78e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

Prado::using('Application.Portlets.Portlet');

class LoginPortlet extends Portlet
{
	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->reload();
			//$this->Response->redirect($this->Application->getModule('auth')->getReturnUrl());
	}
}

?>