diff options
author | xue <> | 2006-01-19 14:40:15 +0000 |
---|---|---|
committer | xue <> | 2006-01-19 14:40:15 +0000 |
commit | f56a3799ded6b18c98eb9810d9e4c79a9c23c796 (patch) | |
tree | 038fa75c15d700382e62960afae70f474055b887 /demos/personal/protected/Pages/UserLogin.php | |
parent | 1bfd7c4641e0457ac558cf74290a6a7ff1a3af58 (diff) |
Updated "personal" demo.
Diffstat (limited to 'demos/personal/protected/Pages/UserLogin.php')
-rw-r--r-- | demos/personal/protected/Pages/UserLogin.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/demos/personal/protected/Pages/UserLogin.php b/demos/personal/protected/Pages/UserLogin.php index 70cbc986..0dd2cd79 100644 --- a/demos/personal/protected/Pages/UserLogin.php +++ b/demos/personal/protected/Pages/UserLogin.php @@ -5,10 +5,15 @@ class UserLogin extends TPage public function login($sender,$param)
{
$manager=$this->Application->getModule('auth');
- if($manager->login($this->username->Text,$this->password->Text))
- $this->Application->Response->redirect($this->Application->Request->Items['ReturnUrl']);
- else
- $this->error->Text='login failed';
+ 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->Request->Items['ReturnUrl']);
}
}
|