]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/RegistrationService.php
Fixed tests from streaming changes
[bookstack] / app / Auth / Access / RegistrationService.php
index 48970bd2e4c531d82a7ebbcda11c7bf7cbb39433..6fcb404ee83bc5023753c8747b1439a398847b5a 100644 (file)
@@ -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) {