]> BookStack Code Mirror - bookstack/blobdiff - app/Settings/SettingService.php
Updated user references to be app-default-supporting functions
[bookstack] / app / Settings / SettingService.php
index 663a6ae3275954a2fa944c3d80fa07d832861038..489963aad7cde7b361ffdecfcb4e7d7edb4e3301 100644 (file)
@@ -67,6 +67,17 @@ class SettingService
         return $this->get($this->userKey($user->id, $key), $default);
     }
 
+    /**
+     * Get a value for the current logged-in user.
+     * @param $key
+     * @param bool $default
+     * @return bool|string
+     */
+    public function getForCurrentUser($key, $default = false)
+    {
+        return $this->getUser(user(), $key, $default);
+    }
+
     /**
      * Gets a setting value from the cache or database.
      * Looks at the system defaults if not cached or in database.