Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function validateLogin($username, $password) {
- return (
- (!empty($username) || $this->invalidate('username', 'notempty')) &&
- (!empty($password) || $this->invalidate('password', 'notempty')) &&
- !empty($password) &&
- ($u = $this->findByUsername($username, 'password')) &&
- isset($u['User']['password']) &&
- ($hash = $this->generateHash($username, $password)) &&
- $u['User']['password'] == $hash
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment