<title>Mehrfaktor-Authentifizierung deaktivieren</title>
</content>
</page>
+ <page identifier="com.woltlab.wcf.Reauthentication">
+ <pageType>system</pageType>
+ <controller>wcf\form\ReauthenticationForm</controller>
+ <name language="en">Re-authentication</name>
+ <name language="de">Erneute Authentifizierung</name>
+ <hasFixedParent>1</hasFixedParent>
+ <excludeFromLandingPage>1</excludeFromLandingPage>
+ <availableDuringOfflineMode>1</availableDuringOfflineMode>
+ <content language="en">
+ <title>Re-authentication</title>
+ </content>
+ <content language="de">
+ <title>Erneute Authentifizierung</title>
+ </content>
+ </page>
</import>
<delete>
<page identifier="com.woltlab.wcf.Mail"/>
--- /dev/null
+<?php
+namespace wcf\form;
+use wcf\form\AbstractFormBuilderForm;
+use wcf\system\application\ApplicationHandler;
+use wcf\system\exception\IllegalLinkException;
+use wcf\system\form\builder\field\user\UserPasswordField;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
+use wcf\util\HeaderUtil;
+
+/**
+ * Represents the reauthentication form.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2020 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Form
+ * @since 5.4
+ */
+class ReauthenticationForm extends AbstractFormBuilderForm {
+ const AVAILABLE_DURING_OFFLINE_MODE = true;
+
+ /**
+ * @inheritDoc
+ */
+ public $formAction = 'authenticate';
+
+ /**
+ * @var string
+ */
+ public $redirectUrl;
+
+ /**
+ * @inheritDoc
+ */
+ public function readParameters() {
+ parent::readParameters();
+
+ if (!empty($_GET['url']) && ApplicationHandler::getInstance()->isInternalURL($_GET['url'])) {
+ $this->redirectUrl = $_GET['url'];
+ }
+ else {
+ throw new IllegalLinkException();
+ }
+
+ if (!WCF::getSession()->needsReauthentication()) {
+ $this->performRedirect();
+ }
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function createForm() {
+ parent::createForm();
+
+ $this->form->appendChild(
+ UserPasswordField::create()
+ ->required(),
+ );
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function save() {
+ AbstractForm::save();
+
+ WCF::getSession()->registerReauthentication();
+
+ $this->saved();
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function saved() {
+ AbstractForm::saved();
+
+ $this->performRedirect();
+ }
+
+ /**
+ * Returns to the redirectUrl.
+ */
+ protected function performRedirect() {
+ HeaderUtil::redirect($this->redirectUrl);
+ exit;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ protected function setFormAction() {
+ $this->form->action(LinkHandler::getInstance()->getControllerLink(static::class, [
+ 'url' => $this->redirectUrl,
+ ]));
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function assignVariables() {
+ parent::assignVariables();
+
+ WCF::getTPL()->assign([
+ 'redirectUrl' => $this->redirectUrl,
+ ]);
+ }
+}
<item name="wcf.user.status.banned"><![CDATA[Der Benutzer ist gesperrt.]]></item>
<item name="wcf.user.status.isDisabled"><![CDATA[Der Benutzer ist nicht freigeschaltet.]]></item>
<item name="wcf.user.status.blacklistMatches"><![CDATA[Der Benutzer wurde aufgrund eines Treffers in der Datenbank von „Stop Forum Spam“ automatisch deaktiviert (Übereinstimmungen: {implode glue=', ' from=$user->getBlacklistMatchesTitle() item=matchLabel}{$matchLabel}{/implode}).]]></item>
+ <item name="wcf.user.reauthentication"><![CDATA[Erneute Authentifizierung]]></item>
</category>
<category name="wcf.user.menu">
<item name="wcf.user.menu.community"><![CDATA[Community]]></item>
<item name="wcf.user.status.banned"><![CDATA[The user has been banned.]]></item>
<item name="wcf.user.status.isDisabled"><![CDATA[The user has not been approved yet.]]></item>
<item name="wcf.user.status.blacklistMatches"><![CDATA[The user has been automatically disabled because of matches in the “Stop Forum Spam” database (Matches: {implode glue=', ' from=$user->getBlacklistMatchesTitle() item=matchLabel}{$matchLabel}{/implode}).]]></item>
+ <item name="wcf.user.reauthentication"><![CDATA[Re-authentication]]></item>
</category>
<category name="wcf.user.menu">
<item name="wcf.user.menu.community"><![CDATA[Community]]></item>