diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-08-23 13:08:33 +0200 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-08-23 13:08:33 +0200 |
commit | 0269aefc30d65ddb5d197bac7819feed5bf78de8 (patch) | |
tree | 785c3e8d7438e78fcca7bf2867620910515109b4 /framework/Wsat/pages/TWsatLogin.php | |
parent | 8e4409a70876175ba8dc54e1a084c37a7861bfbf (diff) |
Manually backported Wsat
Diffstat (limited to 'framework/Wsat/pages/TWsatLogin.php')
-rw-r--r-- | framework/Wsat/pages/TWsatLogin.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php new file mode 100644 index 00000000..21994c07 --- /dev/null +++ b/framework/Wsat/pages/TWsatLogin.php @@ -0,0 +1,33 @@ +<?php + +/** + * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages + */ +class TWsatLogin extends TPage +{ + + public function login() + { + if ($this->IsValid) + { + $this->Session["wsat_password"] = $this->getService()->getPassword(); + + $url = $this->Service->constructUrl('TWsatHome'); + $this->Response->redirect($url); + } + } + + public function validatePassword($sender, $param) + { + $config_pass = $this->Service->Password; + $user_pass = $this->password->Text; + $param->IsValid = $user_pass === $config_pass; + } + +}
\ No newline at end of file |