コード例 #1
0
 /**
  * Process the login, create the user session and then redirect to 
  * the appropriate page
  */
 public function Login()
 {
     $user = new Autenticacao($this->Phreezer);
     if ($user->Login(RequestUtil::Get('username'), RequestUtil::Get('password'))) {
         // login success
         $this->SetCurrentUser($user);
         $this->Redirect('SecureExample.UserPage');
     } else {
         // login failed
         $this->Redirect('SecureExample.LoginForm', 'Unknown username/password combination');
     }
 }
コード例 #2
0
ファイル: Autenticacao.php プロジェクト: joaoricardorm/tcc
 /**
  * Process the login, create the user session and then redirect to 
  * the appropriate page
  */
 public function Autenticar()
 {
     //$autenticacao = new Autenticacao($this->Phreezer);
     if (!Autenticacao::Login(RequestUtil::Get('username'), RequestUtil::Get('password'))) {
         //Se o login falhar
         $this->Redirect('SecureExample.LoginForm', 'Usuário ou senha incorretos.');
     }
 }