Changeset 2391 for trunk/modules/auth
- Timestamp:
- 03/31/2008 03:06:27 PM (8 months ago)
- Location:
- trunk/modules/auth
- Files:
-
- 2 modified
-
controllers/auth_demo.php (modified) (1 diff)
-
libraries/Auth.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/auth/controllers/auth_demo.php
r2388 r2391 86 86 87 87 // Attempt a login 88 if ($ this->auth->login($user, $form->password->value))88 if ($user->has_role('login') AND $this->auth->login($user, $form->password->value)) 89 89 { 90 90 echo '<h4>Login Success!</h4>'; -
trunk/modules/auth/libraries/Auth.php
r2389 r2391 109 109 $password = $this->hash_password($password, $this->find_salt($user->password)); 110 110 111 // If the user has the "login" role and thepasswords match, perform a login112 if ($user-> has_role('login') AND $user->password === $password)111 // If the passwords match, perform a login 112 if ($user->password === $password) 113 113 { 114 114 if ($remember === TRUE) … … 148 148 $user = new User_Model($token->user_id); 149 149 150 if ($token->id != 0 AND $user->id !=0)150 if ($token->id > 0 AND $user->id > 0) 151 151 { 152 152 if ($token->user_agent === sha1(Kohana::$user_agent))
