diff --git a/lib/Service/UserMigrationService.php b/lib/Service/UserMigrationService.php index ac2fe9b9..2cd988ec 100644 --- a/lib/Service/UserMigrationService.php +++ b/lib/Service/UserMigrationService.php @@ -64,6 +64,7 @@ public function __construct( private UserImportMapper $importMapper, private IJobList $jobList, private IAppConfig $appConfig, + private ISecureRandom $secureRandom, ) { $this->internalCache = new CappedMemoryCache(); @@ -258,7 +259,7 @@ protected function importUser(?IUser $user, if ($user === null) { $user = $this->userManager->createUser( $data['uid'], - \OC::$server->getSecureRandom()->generate(10, ISecureRandom::CHAR_ALPHANUMERIC) + $this->secureRandom->generate(10, ISecureRandom::CHAR_ALPHANUMERIC) ); }