1
0
mirror of https://github.com/flarum/core.git synced 2025-10-09 14:06:26 +02:00

Implement user preferences API

Preferences must be registered (optionally with a callback to transform
data, and a default value) on the User model.
This commit is contained in:
Toby Zerner
2015-03-28 11:50:02 +10:30
parent 3c3f8242e2
commit 359f44552e
6 changed files with 61 additions and 1 deletions

View File

@@ -146,6 +146,9 @@ class CoreServiceProvider extends ServiceProvider
User::setHasher($this->app['hash']);
User::setFormatter($this->app['flarum.formatter']);
User::registerPreference('discloseOnline', 'boolval', true);
User::registerPreference('indexProfile', 'boolval', true);
}
public function registerPermissions()