Make use of ->markRequiredFields(false) for single-field authentication forms
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Dec 2020 09:45:16 +0000 (10:45 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Dec 2020 09:45:16 +0000 (10:45 +0100)
wcfsetup/install/files/lib/form/ReauthenticationForm.class.php
wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php
wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php
wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php

index ee9c1f301e406a47a24e6801dad8ce4018f3a63e..7667be542e2a441cb8712a3fd6955d755af3e5bd 100644 (file)
@@ -55,6 +55,7 @@ class ReauthenticationForm extends AbstractFormBuilderForm {
        protected function createForm() {
                parent::createForm();
                
+               $this->form->markRequiredFields(false);
                $this->form->appendChildren([
                        TemplateFormNode::create('loginAs')
                                ->templateName('__reauthenticationLoginAs'),
index 7f5a6b1a8b7f608b3ac3c664c095b21198e0e2f3..8d63feb11f943ccc8c138cfe7e2d94e67d58494c 100644 (file)
@@ -240,6 +240,8 @@ class BackupMultifactorMethod implements IMultifactorMethod {
         * @inheritDoc
         */
        public function createAuthenticationForm(IFormDocument $form, Setup $setup): void {
+               $form->markRequiredFields(false);
+               
                $sql = "SELECT  *
                        FROM    wcf".WCF_N."_user_multifactor_backup
                        WHERE   setupID = ?";
index 4ca96e10a1272b8ef0eff7b8c5f903fb8d1d23ef..740ae8144c02bea14131d229048dcc3f43cd4ec7 100644 (file)
@@ -132,6 +132,8 @@ class EmailMultifactorMethod implements IMultifactorMethod {
         * @inheritDoc
         */
        public function createAuthenticationForm(IFormDocument $form, Setup $setup): void {
+               $form->markRequiredFields(false);
+               
                $sql = "SELECT  code, createTime
                        FROM    wcf".WCF_N."_user_multifactor_email
                        WHERE           setupID = ?
index 6edcddd6f0ba3beeaaab5dd0ec2e872f6556cb88..6a7e1ce03d7b1ccd83637458e66bd705368b43c8 100644 (file)
@@ -243,6 +243,8 @@ class TotpMultifactorMethod implements IMultifactorMethod {
         * @inheritDoc
         */
        public function createAuthenticationForm(IFormDocument $form, Setup $setup): void {
+               $form->markRequiredFields(false);
+               
                $sql = "SELECT          *
                        FROM            wcf".WCF_N."_user_multifactor_totp
                        WHERE           setupID = ?