Exemplo n.º 1
0
 private function tryProcessPostData($postData)
 {
     $reqfields = array('username', 'password');
     if (!$postData->hasValues($reqfields)) {
         $this->errorMessage = 'Please submit username and password.';
         return;
     }
     $fields = $reqfields;
     extract($postData->filter($fields));
     $uid = Authorization::login($username, $password);
     if ($uid === false) {
         $this->errorMessage = 'Incorrect user / password';
         return;
     }
     $this->redirectTo('home');
     exit;
 }