1
0
mirror of https://github.com/flarum/core.git synced 2025-07-22 01:01:28 +02:00

Make sure activation status/email is returned when creating a user

This commit is contained in:
Toby Zerner
2015-10-11 22:29:14 +10:30
parent 7aaeea3a17
commit 8c0ce38e78

View File

@@ -20,6 +20,8 @@ class CurrentUserSerializer extends UserSerializer
$attributes = parent::getDefaultAttributes($user); $attributes = parent::getDefaultAttributes($user);
$attributes += [ $attributes += [
'isActivated' => $user->is_activated,
'email' => $user->email,
'readTime' => $this->formatDate($user->read_time), 'readTime' => $this->formatDate($user->read_time),
'unreadNotificationsCount' => (int) $user->getUnreadNotificationsCount(), 'unreadNotificationsCount' => (int) $user->getUnreadNotificationsCount(),
'newNotificationsCount' => (int) $user->getNewNotificationsCount(), 'newNotificationsCount' => (int) $user->getNewNotificationsCount(),