Guest User

Untitled

a guest
Oct 19th, 2016
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public function login($username, $password)
  2. {
  3. if ($username == "" || $password == "")
  4. return false;
  5.  
  6. $adapter = new \Application_Security_Auth_Adapter();
  7.  
  8. $adapter->setIdentity($username);
  9. $adapter->setCredential($password);
  10.  
  11. $auth = \Zend_Auth::getInstance();
  12. $result = $auth->authenticate($adapter);
  13.  
  14. return $result->isValid();
  15. }
Add Comment
Please, Sign In to add comment