]> BookStack Code Mirror - bookstack/blobdiff - app/Users/Models/User.php
Fixed OIDC Logout
[bookstack] / app / Users / Models / User.php
index 08cab69fb9206c793cde08cf08518f345188e5a0..be3e9b9b38e468ea0003de1cba22ebdd3976c2aa 100644 (file)
@@ -88,8 +88,6 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
 
     /**
      * This holds the default user when loaded.
-     *
-     * @var null|User
      */
     protected static ?User $defaultUser = null;
 
@@ -107,6 +105,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
         return static::$defaultUser;
     }
 
+    public static function clearDefault(): void
+    {
+        static::$defaultUser = null;
+    }
+
     /**
      * Check if the user is the default public user.
      */