From 04b4f84f0fa8ee3385026741c934e9dd9f020ce8 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Sat, 16 Oct 2021 22:48:38 -0500 Subject: [PATCH] [6.x] Fix logout() when using AuthenticateSession and default guard Fix was attempted by #826, but the string concatenation is wrong and it never uses the default guard. --- src/Http/Controllers/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/UserController.php b/src/Http/Controllers/UserController.php index 121683b89..5cce541e2 100644 --- a/src/Http/Controllers/UserController.php +++ b/src/Http/Controllers/UserController.php @@ -58,7 +58,7 @@ public function logout($guard = null) { Auth::guard($guard ?: config('auth.defaults.guard'))->logout(); - Session::forget('password_hash_'.$guard ?: config('auth.defaults.guard')); + Session::forget('password_hash_'.($guard ?: config('auth.defaults.guard'))); } /**