Ticket #555 (closed Bug: fixed)
Auth, missing auto_login method
| Reported by: | alexsancho | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | major | Milestone: | 2.2 |
| Component: | Modules:Auth | Version: | SVN HEAD |
| Keywords: | Cc: |
Description
New Auth module fails to auto_login, seems that this method just doesn't exists
public function auto_login()
{
if ($token = cookie::get('authautologin'))
{
// Load the token and user
$token = new User_Token_Model($token);
$user = new User_Model($token->user_id);
if ($token->id > 0 AND $user->id > 0)
{
if ($token->user_agent === sha1(Kohana::$user_agent))
{
// Save the token to create a new unique token
$token->save();
// Set the new token
cookie::set('authautologin', $token->token, $token->expires - time());
// Complete the login with the found data
$this->complete_login($user);
// Automatic login was successful
return TRUE;
}
// Token is invalid
$token->delete();
}
}
return FALSE;
}
Change History
Note: See
TracTickets for help on using
tickets.
