summaryrefslogtreecommitdiff
path: root/demos/personal/protected/Common/LoginPortlet.php
diff options
context:
space:
mode:
authorxue <>2007-02-09 19:02:43 +0000
committerxue <>2007-02-09 19:02:43 +0000
commit8d156610be187427d43f4d033b258f060f8968ad (patch)
treea4aa2a899d47dec014bb61d307930fed579a75bb /demos/personal/protected/Common/LoginPortlet.php
parent08fab57660b3cac36630ca6e2c4f677d1d7f2655 (diff)
reorganize personal demo.
Diffstat (limited to 'demos/personal/protected/Common/LoginPortlet.php')
-rw-r--r--demos/personal/protected/Common/LoginPortlet.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/demos/personal/protected/Common/LoginPortlet.php b/demos/personal/protected/Common/LoginPortlet.php
new file mode 100644
index 00000000..1f5cd4f5
--- /dev/null
+++ b/demos/personal/protected/Common/LoginPortlet.php
@@ -0,0 +1,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());
+ }
+}
+
+?> \ No newline at end of file