use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
class Base extends \OC\Core\Command\Base {
- protected IUserManager $userManager;
+ public function __construct(
+ ?string $name,
+ protected IUserManager $userManager,
+ ) {
+ parent::__construct($name);
+ }
/**
* Return possible values for the named option
namespace OC\Core\Command\TwoFactorAuth;
use OCP\Authentication\TwoFactorAuth\IRegistry;
+use OCP\IUserManager;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Cleanup extends Base {
- public function __construct(private IRegistry $registry) {
- parent::__construct();
+ public function __construct(
+ private IRegistry $registry,
+ protected IUserManager $userManager,
+ ) {
+ parent::__construct(
+ null,
+ $userManager,
+ );
}
protected function configure() {
private ProviderManager $manager,
protected IUserManager $userManager,
) {
- parent::__construct('twofactorauth:disable');
+ parent::__construct(
+ 'twofactorauth:disable',
+ $userManager,
+ );
}
protected function configure() {
private ProviderManager $manager,
protected IUserManager $userManager,
) {
- parent::__construct('twofactorauth:enable');
+ parent::__construct(
+ 'twofactorauth:enable',
+ $userManager,
+ );
}
protected function configure() {
private IRegistry $registry,
protected IUserManager $userManager,
) {
- parent::__construct('twofactorauth:state');
+ parent::__construct(
+ 'twofactorauth:state',
+ $userManager,
+ );
}
protected function configure() {