From 3d51200a882d5a557dd14c88f1ae34f539b353b6 Mon Sep 17 00:00:00 2001 From: Joel Marcotte Date: Thu, 20 Sep 2012 17:54:28 -0400 Subject: [PATCH] Auth token now nulled on logout Signed-off-by: Joel Marcotte --- laravel/auth/drivers/driver.php | 2 ++ laravel/tests/cases/auth.test.php | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/laravel/auth/drivers/driver.php b/laravel/auth/drivers/driver.php index db649d24065..96e90637930 100644 --- a/laravel/auth/drivers/driver.php +++ b/laravel/auth/drivers/driver.php @@ -127,6 +127,8 @@ public function logout() $this->cookie($this->recaller(), null, -2000); Session::forget($this->token()); + + $this->token = null; } /** diff --git a/laravel/tests/cases/auth.test.php b/laravel/tests/cases/auth.test.php index 16ba428ad8b..f038a176428 100644 --- a/laravel/tests/cases/auth.test.php +++ b/laravel/tests/cases/auth.test.php @@ -294,9 +294,6 @@ public function testLogoutMethodLogsOutUser() 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->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login']));