- try {
- $this->registrationService->registerUser($userData, $socialAccount, $emailVerified);
- } catch (UserRegistrationException $exception) {
- if ($exception->getMessage()) {
- $this->showErrorNotification($exception->getMessage());
- }
- return redirect($exception->redirectLocation);
+ // Take name from email address if empty
+ if (!$userData['name']) {
+ $userData['name'] = explode('@', $userData['email'])[0];