Transfer to settings app and register

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2022-03-04 06:36:49 +00:00
parent ce6f0349be
commit e5a205fec1
5 changed files with 14 additions and 4 deletions

View file

@ -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',
);

View file

@ -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',
);

View file

@ -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 {

View file

@ -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;

View file

@ -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 {
}