aboutsummaryrefslogtreecommitdiff
path: root/app/Models/UserConfiguration.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/UserConfiguration.php')
-rw-r--r--app/Models/UserConfiguration.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php
index a1e0dbbaa..7ccaa2671 100644
--- a/app/Models/UserConfiguration.php
+++ b/app/Models/UserConfiguration.php
@@ -41,7 +41,7 @@ declare(strict_types=1);
* @property bool $onread_jump_next
* @property string $passwordHash
* @property int $posts_per_page
- * @property array<array{'get'?:string,'name'?:string,'order'?:string,'search'?:string,'state'?:int,'url'?:string}> $queries
+ * @property array<array{'get'?:string,'name'?:string,'order'?:string,'search'?:string,'state'?:int,'url'?:string,'token'?:string}> $queries
* @property bool $reading_confirm
* @property int $since_hours_posts_per_rss
* @property bool $show_fav_unread
@@ -82,6 +82,20 @@ final class FreshRSS_UserConfiguration extends Minz_Configuration {
}
/**
+ * Access the default configuration for users.
+ * @throws Minz_FileNotExistException
+ */
+ public static function default(): FreshRSS_UserConfiguration {
+ static $default_user_conf = null;
+ if ($default_user_conf == null) {
+ $namespace = 'user_default';
+ FreshRSS_UserConfiguration::register($namespace, '_', FRESHRSS_PATH . '/config-user.default.php');
+ $default_user_conf = FreshRSS_UserConfiguration::get($namespace);
+ }
+ return $default_user_conf;
+ }
+
+ /**
* @param non-empty-string $key
* @return array<int|string,mixed>|null
*/