From 368a13aee172da264ab0107ba6d2767f3fd391f1 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 30 Mar 2015 12:56:41 +1030 Subject: [PATCH] Oops --- framework/core/src/Web/Middleware/LoginWithCookie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Web/Middleware/LoginWithCookie.php b/framework/core/src/Web/Middleware/LoginWithCookie.php index dd8f7acb1..e496ee133 100644 --- a/framework/core/src/Web/Middleware/LoginWithCookie.php +++ b/framework/core/src/Web/Middleware/LoginWithCookie.php @@ -18,7 +18,7 @@ class LoginWithCookie { if (($token = $request->cookie('flarum_remember')) && ($accessToken = AccessToken::where('id', $token)->first())) { - $this->actor->setUser($accessToken->user); + $this->actor->setUser($user = $accessToken->user); $user->updateLastSeen()->save(); }