change to find first user with public front
This commit is contained in:
parent
7b9d3f0ec6
commit
50d6dc7b71
1 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,10 @@ class User extends Authenticatable
|
||||||
if ($current_user) { // if logged in, set this user
|
if ($current_user) { // if logged in, set this user
|
||||||
return $current_user;
|
return $current_user;
|
||||||
} else { // not logged in, get first user
|
} else { // not logged in, get first user
|
||||||
$user = User::first();
|
$user = User::where('public_front',true)->first();
|
||||||
|
if(!$user) {
|
||||||
|
$user = User::first();
|
||||||
|
}
|
||||||
session(['current_user' => $user]);
|
session(['current_user' => $user]);
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue