X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/41438adbd1dbe8688ff8ff7d3dbb835d1e9650e1..refs/pull/3391/head:/app/Auth/Access/RegistrationService.php diff --git a/app/Auth/Access/RegistrationService.php b/app/Auth/Access/RegistrationService.php index 48970bd2e..6fcb404ee 100644 --- a/app/Auth/Access/RegistrationService.php +++ b/app/Auth/Access/RegistrationService.php @@ -54,6 +54,7 @@ class RegistrationService /** * Attempt to find a user in the system otherwise register them as a new * user. For use with external auth systems since password is auto-generated. + * * @throws UserRegistrationException */ public function findOrRegister(string $name, string $email, string $externalId): User @@ -95,7 +96,8 @@ class RegistrationService } // Create the user - $newUser = $this->userRepo->registerNew($userData, $emailConfirmed); + $newUser = $this->userRepo->createWithoutActivity($userData, $emailConfirmed); + $newUser->attachDefaultRole(); // Assign social account if given if ($socialAccount) {