diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-03-04 06:36:49 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-03-18 04:51:26 +0000 |
commit | e5a205fec1d869dc782ae819aba945309bd8aab0 (patch) | |
tree | 7fee36781841c3fce2d561ff5d213c2964d2b412 | |
parent | ce6f0349befcf61db4629a83c736fd445f7cce7c (diff) | |
download | nextcloud-server-e5a205fec1d869dc782ae819aba945309bd8aab0.tar.gz nextcloud-server-e5a205fec1d869dc782ae819aba945309bd8aab0.zip |
Transfer to settings app and register
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r-- | apps/settings/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | apps/settings/composer/composer/autoload_static.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | apps/settings/lib/UserMigration/AccountMigrator.php (renamed from lib/private/Accounts/AccountMigrator.php) | 5 | ||||
-rw-r--r-- | apps/settings/lib/UserMigration/AccountMigratorException.php (renamed from lib/private/Accounts/AccountMigratorException.php) | 6 |
5 files changed, 14 insertions, 4 deletions
diff --git a/apps/settings/composer/composer/autoload_classmap.php b/apps/settings/composer/composer/autoload_classmap.php index 3d3729a66e5..bd092f3b401 100644 --- a/apps/settings/composer/composer/autoload_classmap.php +++ b/apps/settings/composer/composer/autoload_classmap.php @@ -74,5 +74,7 @@ return array( 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset' => $baseDir . '/../lib/SetupChecks/PhpDefaultCharset.php', 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering' => $baseDir . '/../lib/SetupChecks/PhpOutputBuffering.php', 'OCA\\Settings\\SetupChecks\\SupportedDatabase' => $baseDir . '/../lib/SetupChecks/SupportedDatabase.php', + 'OCA\\Settings\\UserMigration\\AccountMigrator' => $baseDir . '/../lib/UserMigration/AccountMigrator.php', + 'OCA\\Settings\\UserMigration\\AccountMigratorException' => $baseDir . '/../lib/UserMigration/AccountMigratorException.php', 'OCA\\Settings\\WellKnown\\SecurityTxtHandler' => $baseDir . '/../lib/WellKnown/SecurityTxtHandler.php', ); diff --git a/apps/settings/composer/composer/autoload_static.php b/apps/settings/composer/composer/autoload_static.php index 7d00184dc7f..b8aec66c25b 100644 --- a/apps/settings/composer/composer/autoload_static.php +++ b/apps/settings/composer/composer/autoload_static.php @@ -89,6 +89,8 @@ class ComposerStaticInitSettings 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset' => __DIR__ . '/..' . '/../lib/SetupChecks/PhpDefaultCharset.php', 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering' => __DIR__ . '/..' . '/../lib/SetupChecks/PhpOutputBuffering.php', 'OCA\\Settings\\SetupChecks\\SupportedDatabase' => __DIR__ . '/..' . '/../lib/SetupChecks/SupportedDatabase.php', + 'OCA\\Settings\\UserMigration\\AccountMigrator' => __DIR__ . '/..' . '/../lib/UserMigration/AccountMigrator.php', + 'OCA\\Settings\\UserMigration\\AccountMigratorException' => __DIR__ . '/..' . '/../lib/UserMigration/AccountMigratorException.php', 'OCA\\Settings\\WellKnown\\SecurityTxtHandler' => __DIR__ . '/..' . '/../lib/WellKnown/SecurityTxtHandler.php', ); diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php index 4810e78db2b..89a988621f2 100644 --- a/apps/settings/lib/AppInfo/Application.php +++ b/apps/settings/lib/AppInfo/Application.php @@ -46,6 +46,7 @@ use OCA\Settings\Mailer\NewUserMailHelper; use OCA\Settings\Middleware\SubadminMiddleware; use OCA\Settings\Search\AppSearch; use OCA\Settings\Search\SectionSearch; +use OCA\Settings\UserMigration\AccountMigrator; use OCA\Settings\WellKnown\SecurityTxtHandler; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; @@ -131,6 +132,8 @@ class Application extends App implements IBootstrap { Util::getDefaultEmailAddress('no-reply') ); }); + + $context->registerUserMigrator(AccountMigrator::class); } public function boot(IBootContext $context): void { diff --git a/lib/private/Accounts/AccountMigrator.php b/apps/settings/lib/UserMigration/AccountMigrator.php index 9edda8f1d4f..58003244767 100644 --- a/lib/private/Accounts/AccountMigrator.php +++ b/apps/settings/lib/UserMigration/AccountMigrator.php @@ -24,9 +24,12 @@ declare(strict_types=1); * */ -namespace OC\Accounts; +namespace OCA\Settings\UserMigration; use InvalidArgumentException; +use OC\Accounts\AccountProperty; +use OC\Accounts\AccountPropertyCollection; +use OC\Accounts\TAccountsHelper; use OC\NotSquareException; use OCP\Accounts\IAccountManager; use OCP\IAvatarManager; diff --git a/lib/private/Accounts/AccountMigratorException.php b/apps/settings/lib/UserMigration/AccountMigratorException.php index 328ecebb7b4..91c63ba9d80 100644 --- a/lib/private/Accounts/AccountMigratorException.php +++ b/apps/settings/lib/UserMigration/AccountMigratorException.php @@ -24,9 +24,9 @@ declare(strict_types=1); * */ -namespace OC\Accounts; +namespace OCA\Settings\UserMigration; -use Exception; +use OCP\UserMigration\UserMigrationException; -class AccountMigratorException extends Exception { +class AccountMigratorException extends UserMigrationException { } |