X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/2734/head:/app/Auth/Access/RegistrationService.php diff --git a/app/Auth/Access/RegistrationService.php b/app/Auth/Access/RegistrationService.php index 2aff6c37d..68b17771d 100644 --- a/app/Auth/Access/RegistrationService.php +++ b/app/Auth/Access/RegistrationService.php @@ -6,6 +6,8 @@ use BookStack\Auth\User; use BookStack\Auth\UserRepo; use BookStack\Exceptions\UserRegistrationException; use BookStack\Facades\Activity; +use BookStack\Facades\Theme; +use BookStack\Theming\ThemeEvents; use Exception; class RegistrationService @@ -71,6 +73,7 @@ class RegistrationService } Activity::add(ActivityType::AUTH_REGISTER, $socialAccount ?? $newUser); + Theme::dispatch(ThemeEvents::AUTH_REGISTER, $socialAccount ? $socialAccount->driver : auth()->getDefaultDriver(), $newUser); // Start email confirmation flow if required if ($this->emailConfirmationService->confirmationRequired() && !$emailConfirmed) { @@ -83,7 +86,6 @@ class RegistrationService $message = trans('auth.email_confirm_send_error'); throw new UserRegistrationException($message, '/register/confirm'); } - } return $newUser; @@ -109,5 +111,4 @@ class RegistrationService throw new UserRegistrationException(trans('auth.registration_email_domain_invalid'), $redirect); } } - -} \ No newline at end of file +}