Update RegistrationController.php

Method registerAction:   
  $form->handleRequest($request);
  if ($form->isValid()) { ...