private function createUser()
 {
     $this->testIfEmailAlreadyInUse();
     $this->testIfUsernameAlreadyInUse();
     $this->populateUserWithSubmitedDatas();
     $modelErrors = $this->sfValidator->validate($this->newUser);
     if (count($modelErrors)) {
         throw new \Exception(json_encode($modelErrors), 400);
     }
     //
     $this->dispatcher->dispatch(SfynxCmfEvents::REGISTRATION_WS_SUCCESS, new UserEvent($this->newUser, $this->request));
     //
     $this->userManager->updateUser($this->newUser);
     if ($this->mailer) {
         $this->mailer->sendConfirmationEmailMessage($this->newUser);
     }
 }