mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +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:
@@ -44,7 +44,8 @@ class UserSerializer extends UserBasicSerializer
|
||||
if ($user->id === $actorUser->id) {
|
||||
$attributes += [
|
||||
'readTime' => $user->read_time ? $user->read_time->toRFC3339String() : null,
|
||||
'unreadNotificationsCount' => $user->getUnreadNotificationsCount()
|
||||
'unreadNotificationsCount' => $user->getUnreadNotificationsCount(),
|
||||
'preferences' => $user->preferences
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user