summaryrefslogtreecommitdiff
path: root/framework/Wsat/pages/TWsatLogin.php
blob: 69f8cc39200e5560a6dce6aa2b3eaad1afef9898 (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
<?php

/**
 * Description of Inicio
 *
 * @author daniels
 */
class TWsatLogin extends TPage {

    public function login() {
        $config_pass = $this->getService()->getPassword();
        $user_pass = $this->password->Text;

        if ($user_pass === $config_pass) {
            $this->Session["wsat_password"] = $config_pass;

            $authManager = $this->Application->getModule('auth');
            $url = $authManager->ReturnUrl;
            if (empty($url)) {
                $url = $this->Service->constructUrl('TWsatHome');
            }
            $this->Response->redirect($url);
        } else {
            echo "user or pass wrong";
        }
    }

}

?>