diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-08 17:05:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 17:05:11 +0200 |
commit | f8b13ecd604451eb853bf1d7d1f12aadc857e527 (patch) | |
tree | 2ec4ae37cc98bbef9b1c6e52fe05dd0aab0706c9 /core/Command | |
parent | fe2f8b5d189cbcda8c4f197197169a6e015d6622 (diff) | |
parent | 458c2fa2971e6595a18a289b0afeb4a79ea0e0d3 (diff) | |
download | nextcloud-server-f8b13ecd604451eb853bf1d7d1f12aadc857e527.tar.gz nextcloud-server-f8b13ecd604451eb853bf1d7d1f12aadc857e527.zip |
Merge pull request #32363 from nextcloud/cleanup/remove-long-deprecated-classes
Remove OCP\App and OCP\BackgroundJob
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Maintenance/Repair.php | 2 | ||||
-rw-r--r-- | core/Command/User/ResetPassword.php | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index aa0f6a2a086..2c1fda7c8e4 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -82,7 +82,7 @@ class Repair extends Command { if (!$this->appManager->isEnabledForUser($app)) { continue; } - $info = \OC_App::getAppInfo($app); + $info = $this->appManager->getAppInfo($app); if (!is_array($info)) { continue; } diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php index 21bc5cc45b0..294cea38b71 100644 --- a/core/Command/User/ResetPassword.php +++ b/core/Command/User/ResetPassword.php @@ -28,6 +28,7 @@ namespace OC\Core\Command\User; use OC\Core\Command\Base; +use OCP\App\IAppManager; use OCP\IUser; use OCP\IUserManager; use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; @@ -41,10 +42,12 @@ use Symfony\Component\Console\Question\Question; class ResetPassword extends Base { protected IUserManager $userManager; + private IAppManager $appManager; - public function __construct(IUserManager $userManager) { - $this->userManager = $userManager; + public function __construct(IUserManager $userManager, IAppManager $appManager) { parent::__construct(); + $this->userManager = $userManager; + $this->appManager = $appManager; } protected function configure() { @@ -84,7 +87,7 @@ class ResetPassword extends Base { /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); - if (\OCP\App::isEnabled('encryption')) { + if ($this->appManager->isEnabledForUser('encryption', $user)) { $output->writeln( '<error>Warning: Resetting the password when using encryption will result in data loss!</error>' ); |