Skip to content

Commit

Permalink
fixed #2889 (Auth_User model doesnt support autologin)
Browse files Browse the repository at this point in the history
  • Loading branch information
biakaveron committed Jun 7, 2010
1 parent a1c9e33 commit 9971fbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/model/auth/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public function login(array & $array, $redirect = FALSE)
->rules('username', $this->_rules['username'])
->rules('password', $this->_rules['password']);

// Get the remember login option
$remember = isset($array['remember']);

// Login starts out invalid
$status = FALSE;

Expand All @@ -64,7 +67,7 @@ public function login(array & $array, $redirect = FALSE)
// Attempt to load the user
$this->where('username', '=', $array['username'])->find();

if ($this->loaded() AND Auth::instance()->login($this, $array['password']))
if ($this->loaded() AND Auth::instance()->login($this, $array['password'], $remember))
{
if (is_string($redirect))
{
Expand Down

0 comments on commit 9971fbb

Please sign in to comment.