diff options
Diffstat (limited to 'apps/settings/lib/UserMigration/AccountMigrator.php')
-rw-r--r-- | apps/settings/lib/UserMigration/AccountMigrator.php | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/apps/settings/lib/UserMigration/AccountMigrator.php b/apps/settings/lib/UserMigration/AccountMigrator.php index dc5ca2691f7..1c51aec5104 100644 --- a/apps/settings/lib/UserMigration/AccountMigrator.php +++ b/apps/settings/lib/UserMigration/AccountMigrator.php @@ -18,6 +18,7 @@ use OCA\Settings\AppInfo\Application; use OCP\Accounts\IAccountManager; use OCP\IAvatarManager; use OCP\IL10N; +use OCP\Image; use OCP\IUser; use OCP\UserMigration\IExportDestination; use OCP\UserMigration\IImportSource; @@ -32,16 +33,8 @@ class AccountMigrator implements IMigrator, ISizeEstimationMigrator { use TAccountsHelper; - private IAccountManager $accountManager; - - private IAvatarManager $avatarManager; - private ProfileManager $profileManager; - private ProfileConfigMapper $configMapper; - - private IL10N $l10n; - private const PATH_ROOT = Application::APP_ID . '/'; private const PATH_ACCOUNT_FILE = AccountMigrator::PATH_ROOT . 'account.json'; @@ -51,17 +44,13 @@ class AccountMigrator implements IMigrator, ISizeEstimationMigrator { private const PATH_CONFIG_FILE = AccountMigrator::PATH_ROOT . 'config.json'; public function __construct( - IAccountManager $accountManager, - IAvatarManager $avatarManager, + private IAccountManager $accountManager, + private IAvatarManager $avatarManager, ProfileManager $profileManager, - ProfileConfigMapper $configMapper, - IL10N $l10n + private ProfileConfigMapper $configMapper, + private IL10N $l10n, ) { - $this->accountManager = $accountManager; - $this->avatarManager = $avatarManager; $this->profileManager = $profileManager; - $this->configMapper = $configMapper; - $this->l10n = $l10n; } /** @@ -156,7 +145,7 @@ class AccountMigrator implements IMigrator, ISizeEstimationMigrator { $output->writeln('Importing avatar from ' . $importPath . '…'); $stream = $importSource->getFileAsStream($importPath); - $image = new \OCP\Image(); + $image = new Image(); $image->loadFromFileHandle($stream); try { |