Пример #1
0
 /**
  * Gets the user info.
  *
  * @param  User $user
  * @return array
  */
 protected function getInfo(User $user)
 {
     return ['id' => $user->getId(), 'username' => $user->getUsername(), 'name' => $user->getName(), 'email' => $user->getEmail(), 'status' => $user->getStatusText(), 'badge' => $user->getStatus() ? 'success' : 'danger', 'new' => $user->isNew(), 'login' => ($date = $user->getLogin()) ? $this['dates']->format($date) : __('Never'), 'registered' => ($date = $user->getRegistered()) ? $this['dates']->format($date) : null];
 }