protected function getDefaultAttributes($user)
{
$attributes = parent::getDefaultAttributes($user);
$attributes += ['isActivated' => (bool) $user->is_activated, 'email' => $user->email, 'readTime' => $this->formatDate($user->read_time), 'unreadNotificationsCount' => (int) $user->getUnreadNotificationsCount(), 'newNotificationsCount' => (int) $user->getNewNotificationsCount(), 'preferences' => (array) $user->preferences];
return $attributes;
}