Merge pull request #1255 from joual/develop

Auth token now nulled on logout
This commit is contained in:
Taylor Otwell 2012-09-25 18:32:36 -07:00
commit 9acf541653
2 changed files with 2 additions and 3 deletions

View File

@ -127,6 +127,8 @@ public function logout()
$this->cookie($this->recaller(), null, -2000); $this->cookie($this->recaller(), null, -2000);
Session::forget($this->token()); Session::forget($this->token());
$this->token = null;
} }
/** /**

View File

@ -294,9 +294,6 @@ public function testLogoutMethodLogsOutUser()
Auth::logout(); Auth::logout();
// A workaround since Cookie will is only stored in memory, until Response class is called.
Auth::driver()->token = null;
$this->assertNull(Auth::user()); $this->assertNull(Auth::user());
$this->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login'])); $this->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login']));