Merge branch 'master' into 2.1.0

This commit is contained in:
Kode 2018-10-21 14:09:39 +01:00
commit abd8c7227d

View file

@ -49,7 +49,10 @@ class User extends Authenticatable
if ($current_user) { // if logged in, set this user
return $current_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]);
return $user;
}