Guest User

Untitled

a guest
Apr 9th, 2018
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1.   public function loginAction()
  2.     {
  3.         $logger = new Zend_Log();
  4.         $attempt = 3;
  5.        
  6.         if ($this->getRequest()->isPost() )
  7.         {
  8.             $username = $this->getRequest()->getPost('name');
  9.             $password = $this->getRequest()->getPost('password');
  10.            
  11.             $authObject = new Application_Model_Authenticate();
  12.             $loginStatus = $authObject->checkCreds($username, $password);
  13.            
  14.             $this->view->auth = $loginStatus;
  15.             $this->view->nameValue = $username;
  16.            
  17.             if (!$this->view->auth && $attempt == 3){
  18.                 $logger->emerg('Logged in 3 times password incorrect');
  19.             }
  20.            
  21.            
  22.         }else{
  23.             $logger->info('Login attempt without any creds');
  24.         }
  25.    
  26.     }
Add Comment
Please, Sign In to add comment