From cad2e3f01ab9d1a65c7d039e212801d9a7b95e99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Sun, 30 Jun 2019 13:02:28 +0200 Subject: [PATCH] Redirect 3rdparty login users to 3rdparty login on password reset See #2951 --- wcfsetup/install/files/lib/form/LostPasswordForm.class.php | 7 +++++-- wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/form/LostPasswordForm.class.php b/wcfsetup/install/files/lib/form/LostPasswordForm.class.php index c0038edaec..fbcb7ae1ba 100644 --- a/wcfsetup/install/files/lib/form/LostPasswordForm.class.php +++ b/wcfsetup/install/files/lib/form/LostPasswordForm.class.php @@ -80,9 +80,12 @@ class LostPasswordForm extends AbstractCaptchaForm { } } - // check if using 3rd party @author dtdesign + // check if using 3rd party if ($this->user->authData) { - throw new UserInputException('username', '3rdParty'); + HeaderUtil::delayedRedirect(LinkHandler::getInstance()->getLink(ucfirst($this->user->getAuthProvider()) . 'Auth'), WCF::getLanguage()->getDynamicVariable('wcf.user.username.error.3rdParty.redirect', [ + 'provider' => WCF::getLanguage()->get('wcf.user.3rdparty.'. $this->user->getAuthProvider()) + ]),5, 'info'); + exit; } // check whether a lost password request was sent in the last 24 hours diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 54df11156f..00586cb009 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -4422,6 +4422,7 @@ Dateianhänge: + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index e8e6141d94..8ab0ed407b 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -4424,6 +4424,7 @@ Attachments: + -- 2.20.1