if ($this->findValidCode($userCode, $codes) === null) {
$field->value('');
- $field->addValidationError(new FormFieldValidationError('invalid'));
+ $field->addValidationError(new FormFieldValidationError(
+ 'invalidCode',
+ 'wcf.user.security.multifactor.error.invalidCode'
+ ));
}
})),
]);
if ($this->findValidCode($userCode, $codes) === null) {
$field->value('');
- $field->addValidationError(new FormFieldValidationError('invalid'));
+ $field->addValidationError(new FormFieldValidationError(
+ 'invalidCode',
+ 'wcf.user.security.multifactor.error.invalidCode'
+ ));
}
})),
]);
$minCounter = 0;
if (!$totp->validateTotpCode($field->getValue(), $minCounter, new \DateTime())) {
$field->value('');
- $field->addValidationError(new FormFieldValidationError('invalid'));
+ $field->addValidationError(new FormFieldValidationError(
+ 'invalidCode',
+ 'wcf.user.security.multifactor.error.invalidCode'
+ ));
}
$field->minCounter($minCounter);
})),
}
}
if ($selectedDevice === null) {
- $field->addValidationError(new FormFieldValidationError('invalid'));
+ // This should never happen.
+ $field->addValidationError(new FormFieldValidationError('unreachable'));
}
$totp = new Totp($selectedDevice['secret']);
$minCounter = $selectedDevice['minCounter'];
if (!$totp->validateTotpCode($field->getValue(), $minCounter, new \DateTime())) {
$field->value('');
- $field->addValidationError(new FormFieldValidationError('invalid'));
+ $field->addValidationError(new FormFieldValidationError(
+ 'invalidCode',
+ 'wcf.user.security.multifactor.error.invalidCode'
+ ));
}
$field->minCounter($minCounter);
})),
{if LANGUAGE_USE_INFORMAL_VARIANT}Du hast{else}Sie haben{/if} auch eine Liste von Notfallcodes erhalten, falls der zusätzliche Faktor unbrauchbar werden sollte. **{if LANGUAGE_USE_INFORMAL_VARIANT}Hast du dir{else}Haben Sie sich{/if} die Notfallcodes notiert?** Falls {if LANGUAGE_USE_INFORMAL_VARIANT}du es vergessen hast, kannst du{else}Sie es vergessen haben, können Sie{/if} dies nachholen, indem {if LANGUAGE_USE_INFORMAL_VARIANT}du{else}Sie{/if} in der Verwaltung der Notfallcodes [URL:{link controller='MultifactorManage' object=$backupMethod isEmail=true}{/link}] neue Notfallcodes {if LANGUAGE_USE_INFORMAL_VARIANT}generierst{else}generieren{/if}.]]></item>
<item name="wcf.user.security.multifactor.authentication.noPendingUserChange"><![CDATA[Die Mehrfaktor-Authentifizierung wurde nicht rechtzeitig abgeschlossen. Aus Sicherheitsgründen wurde der unvollständige Login-Vorgang abgebrochen. Bitte <a href="{link controller='Login'}{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}logge dich{else}loggen Sie sich{/if}</a> erneut ein.]]></item>
<item name="wcf.user.security.multifactor.authentication.noSetup"><![CDATA[Das Benutzerkonto <strong>{$user->username}</strong> ist mit der Mehrfaktor-Authentifizierung geschützt, es sind jedoch keine aktiven Verfahren verfügbar. Bitte {if LANGUAGE_USE_INFORMAL_VARIANT}wende dich{else}wenden Sie sich{/if} an den Administrator.]]></item>
+ <item name="wcf.user.security.multifactor.error.invalidCode"><![CDATA[Der eingebene Code ist ungültig.]]></item>
</category>
<category name="wcf.user.trophy">
<item name="wcf.user.trophy.trophyPoints"><![CDATA[Trophäen]]></item>
You also received a list of emergency codes to use when your second factor becomes unavailable. **Did you store these emergency codes securely?** If you forgot you can do now by generating new codes in the Emergency Code Management [URL:{link controller='MultifactorManage' object=$backupMethod isEmail=true}{/link}].]]></item>
<item name="wcf.user.security.multifactor.authentication.noPendingUserChange"><![CDATA[The multi-factor authentication was not completed in time. The incomplete login process was aborted for security reasons. Please <a href="{link controller='Login'}{/link}">Login</a> once again.]]></item>
<item name="wcf.user.security.multifactor.authentication.noSetup"><![CDATA[The account <strong>{$user->username}</strong> is protected by multi-factor authentication, but no methods are set up. Please contact the administrator for support.]]></item>
+ <item name="wcf.user.security.multifactor.error.invalidCode"><![CDATA[The given code is invalid.]]></item>
</category>
<category name="wcf.user.trophy">
<item name="wcf.user.trophy.trophyPoints"><![CDATA[Trophies]]></item>