/**
  * Convert a User array into a User object.
  *
  * @param array $aUser User.
  *
  * @return User converted object.
  */
 private static function convertToObject($aUser)
 {
     $oUser = new User();
     $oUser->setEmail($aUser['email']);
     $oUser->setPassword($aUser['password']);
     $oUser->setAddress($aUser['address']);
     $oUser->setName($aUser['name']);
     $oUser->setFirstName($aUser['firstname']);
     $oUser->setCp($aUser['cp']);
     $oUser->setCity($aUser['city']);
     $oUser->setRole($aUser['role']);
     return $oUser;
 }