From 88c8cf6c1041f6eafe8eec55769d7573c7e69093 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 1 Nov 2011 20:35:02 -0500 Subject: [PATCH] refactoring. --- laravel/cookie.php | 2 +- laravel/security/auth.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/laravel/cookie.php b/laravel/cookie.php index b912ab49..799f5eb5 100644 --- a/laravel/cookie.php +++ b/laravel/cookie.php @@ -125,7 +125,7 @@ class Cookie { */ public static function forget($name) { - return static::put($name, null, -1500); + return static::put($name, null, -2000); } } \ No newline at end of file diff --git a/laravel/security/auth.php b/laravel/security/auth.php index 07f78266..f580ebf3 100644 --- a/laravel/security/auth.php +++ b/laravel/security/auth.php @@ -63,9 +63,7 @@ class Auth { static::$user = call_user_func(Config::get('auth.user'), Session::get(Auth::user_key)); - $cookie = Cookie::get(Auth::remember_key); - - if (is_null(static::$user) and ! is_null($cookie)) + if (is_null(static::$user) and ! is_null($cookie = Cookie::get(Auth::remember_key))) { static::$user = static::recall($cookie); }