Skip to content

Commit 6bd3592

Browse files
committed
chore: Remove call to deprecated method, use DI instead
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent f28a5da commit 6bd3592

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Service/UserMigrationService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function __construct(
6464
private UserImportMapper $importMapper,
6565
private IJobList $jobList,
6666
private IAppConfig $appConfig,
67+
private ISecureRandom $secureRandom,
6768
) {
6869
$this->internalCache = new CappedMemoryCache();
6970

@@ -258,7 +259,7 @@ protected function importUser(?IUser $user,
258259
if ($user === null) {
259260
$user = $this->userManager->createUser(
260261
$data['uid'],
261-
\OC::$server->getSecureRandom()->generate(10, ISecureRandom::CHAR_ALPHANUMERIC)
262+
$this->secureRandom->generate(10, ISecureRandom::CHAR_ALPHANUMERIC)
262263
);
263264
}
264265

0 commit comments

Comments
 (0)