rintaun

Untitled

Jan 5th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1.         public function validateLogin($username, $password) {
  2.                 return (
  3.                         (!empty($username) || $this->invalidate('username', 'notempty')) &&
  4.                         (!empty($password) || $this->invalidate('password', 'notempty')) &&
  5.                         !empty($password) &&
  6.                         ($u = $this->findByUsername($username, 'password')) &&
  7.                         isset($u['User']['password']) &&
  8.                         ($hash = $this->generateHash($username, $password)) &&
  9.                         $u['User']['password'] == $hash
  10.                 );
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment