Skip to content

Commit 3bc84a3

Browse files
committed
Use statamic guard for logged_in
1 parent 8ff9324 commit 3bc84a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/View/Cascade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ protected function hydrateContent()
173173

174174
private function contextualVariables()
175175
{
176+
$guard = config('statamic.users.guards.web', 'web');
177+
176178
return [
177179
// Constants
178180
'environment' => app()->environment(),
@@ -183,7 +185,7 @@ private function contextualVariables()
183185
'response_code' => 200,
184186

185187
// Auth
186-
'logged_in' => $loggedIn = auth()->check(),
188+
'logged_in' => $loggedIn = auth()->guard($guard)->check(),
187189
'logged_out' => ! $loggedIn,
188190
'current_user' => User::current(),
189191

0 commit comments

Comments
 (0)