/**
  * @param User $user
  *
  * @return GalaxyUser
  */
 private function userTransformer(User $user)
 {
     $username = $user->getUsername();
     $attributes = array();
     $attributes['mail'] = $user->getEmail();
     $attributes['first'] = $user->getFirstname();
     $attributes['last'] = $user->getLastname();
     $attributes['nationality'] = $user->getSection()->getCountry();
     $attributes['picture'] = $user->getGalaxyPicture();
     $attributes['birthdate'] = $user->getBirthdate()->format('d/m/Y');
     $attributes['gender'] = $user->getGender();
     $attributes['telephone'] = $user->getMobile();
     $attributes['address'] = $user->getAddress();
     $attributes['section'] = $user->getSection()->getCode();
     $attributes['country'] = $user->getSection()->getCountry();
     $attributes['sc'] = $user->getSection()->getCode();
     $attributes['roles'] = explode(',', $user->getGalaxyRoles());
     return new GalaxyUser($username, $attributes);
 }