diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-04-11 11:24:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 11:24:20 +0300 |
commit | e36233dbab7995c4b2e037828ccb168005e5d76f (patch) | |
tree | 2736e5d694b6b42572e4b2a3ab62131598cbe1df /apps/settings | |
parent | 823ca53eeac24d9d806494e26eb5337dbe91def6 (diff) | |
parent | e08b8c47a2c265be4642d8116de7ec791b7a07d5 (diff) |
Merge pull request #31911 from nextcloud/enh/extend-migrators
Extend migrators needed for implementation of the API
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/UserMigration/AccountMigrator.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/apps/settings/lib/UserMigration/AccountMigrator.php b/apps/settings/lib/UserMigration/AccountMigrator.php index e50a01e515f..a39c510813f 100644 --- a/apps/settings/lib/UserMigration/AccountMigrator.php +++ b/apps/settings/lib/UserMigration/AccountMigrator.php @@ -32,6 +32,7 @@ use OC\NotSquareException; use OCA\Settings\AppInfo\Application; use OCP\Accounts\IAccountManager; use OCP\IAvatarManager; +use OCP\IL10N; use OCP\IUser; use OCP\UserMigration\IExportDestination; use OCP\UserMigration\IImportSource; @@ -49,6 +50,8 @@ class AccountMigrator implements IMigrator { private IAvatarManager $avatarManager; + private IL10N $l10n; + private const PATH_ROOT = Application::APP_ID . '/'; private const PATH_ACCOUNT_FILE = AccountMigrator::PATH_ROOT . 'account.json'; @@ -57,10 +60,12 @@ class AccountMigrator implements IMigrator { public function __construct( IAccountManager $accountManager, - IAvatarManager $avatarManager + IAvatarManager $avatarManager, + IL10N $l10n ) { $this->accountManager = $accountManager; $this->avatarManager = $avatarManager; + $this->l10n = $l10n; } /** @@ -137,4 +142,25 @@ class AccountMigrator implements IMigrator { } } } + + /** + * {@inheritDoc} + */ + public function getId(): string { + return 'account'; + } + + /** + * {@inheritDoc} + */ + public function getDisplayName(): string { + return $this->l10n->t('Profile information'); + } + + /** + * {@inheritDoc} + */ + public function getDescription(): string { + return $this->l10n->t('Profile picture, full name, email, phone number, address, website, Twitter, organisation, role, headline, biography, and whether your profile is enabled'); + } } |