summaryrefslogtreecommitdiff
path: root/framework/Wsat/pages/TWsatLogin.php
blob: bdf2b17ca8151986c2ed2409863126a053458f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

/**
 * @author Daniel Sampedro Bello <darthdaniel85@gmail.com>
 * @link https://github.com/pradosoft/prado
 * @copyright Copyright &copy; 2005-2016 The PRADO Group
 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
 * @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;
        }

}