Loading lib/Command/Migrate2FASecrets.php +2 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Command; use OCA\EcloudAccounts\AppInfo\Application; use OCA\EcloudAccounts\Db\TwoFactorMapper; use OCA\EcloudAccounts\Service\SSOService; use Symfony\Component\Console\Command\Command; Loading @@ -24,7 +25,7 @@ class Migrate2FASecrets extends Command { protected function configure(): void { $this ->setName('ecloud-accounts:migrate-2fa-secrets') ->setName(Application::APP_ID . ':migrate-2fa-secrets') ->setDescription('Migrates 2FA secrets to SSO database') ->addOption( 'users', Loading lib/Db/TwoFactorMapper.php +5 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,11 @@ class TwoFactorMapper { $qb = $this->conn->getQueryBuilder(); $qb->select('user_id', 'secret') ->from(self::TOTP_SECRET_TABLE) ->where($qb->expr()->eq($qb->expr()->castColumn('state', IQueryBuilder::PARAM_INT), ITotp::STATE_ENABLED)); ->where( $qb->expr()->eq( 'state', $qb->createNamedParameter(ITotp::STATE_ENABLED) ) ); if (!empty($usernames)) { $qb->andWhere('user_id IN (:usernames)') Loading Loading
lib/Command/Migrate2FASecrets.php +2 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Command; use OCA\EcloudAccounts\AppInfo\Application; use OCA\EcloudAccounts\Db\TwoFactorMapper; use OCA\EcloudAccounts\Service\SSOService; use Symfony\Component\Console\Command\Command; Loading @@ -24,7 +25,7 @@ class Migrate2FASecrets extends Command { protected function configure(): void { $this ->setName('ecloud-accounts:migrate-2fa-secrets') ->setName(Application::APP_ID . ':migrate-2fa-secrets') ->setDescription('Migrates 2FA secrets to SSO database') ->addOption( 'users', Loading
lib/Db/TwoFactorMapper.php +5 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,11 @@ class TwoFactorMapper { $qb = $this->conn->getQueryBuilder(); $qb->select('user_id', 'secret') ->from(self::TOTP_SECRET_TABLE) ->where($qb->expr()->eq($qb->expr()->castColumn('state', IQueryBuilder::PARAM_INT), ITotp::STATE_ENABLED)); ->where( $qb->expr()->eq( 'state', $qb->createNamedParameter(ITotp::STATE_ENABLED) ) ); if (!empty($usernames)) { $qb->andWhere('user_id IN (:usernames)') Loading