From 6bd359258a2f0153a03e9065159033663e31f935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 21 Apr 2026 13:25:08 +0200 Subject: [PATCH] chore: Remove call to deprecated method, use DI instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/Service/UserMigrationService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) ); }