From: Tim Düsterhus Date: Thu, 12 Aug 2021 11:45:54 +0000 (+0200) Subject: Consistently use `getControllerLink` in Facebook|Github|GoogleAuthAction X-Git-Tag: 5.5.0_Alpha_1~493^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1da193483bb1c4370e75f4fd8d20a67e383d5c0a;p=GitHub%2FWoltLab%2FWCF.git Consistently use `getControllerLink` in Facebook|Github|GoogleAuthAction --- diff --git a/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php b/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php index 3d9ede13e3..8c2718e4b8 100644 --- a/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php +++ b/wcfsetup/install/files/lib/action/FacebookAuthAction.class.php @@ -5,6 +5,7 @@ namespace wcf\action; use GuzzleHttp\Psr7\Request; use Laminas\Diactoros\Response\RedirectResponse; use wcf\data\user\User; +use wcf\form\AccountManagementForm; use wcf\form\RegisterForm; use wcf\system\event\EventHandler; use wcf\system\exception\NamedUserException; @@ -155,7 +156,11 @@ final class FacebookAuthAction extends AbstractOauth2Action WCF::getSession()->register('__oauthUser', $oauthUser); return new RedirectResponse( - LinkHandler::getInstance()->getLink('AccountManagement') . '#3rdParty' + LinkHandler::getInstance()->getControllerLink( + AccountManagementForm::class, + [], + '#3rdParty' + ) ); } else { // This account does not belong to anyone and we are not logged in. diff --git a/wcfsetup/install/files/lib/action/GithubAuthAction.class.php b/wcfsetup/install/files/lib/action/GithubAuthAction.class.php index 22c5e33566..62b6ce0570 100644 --- a/wcfsetup/install/files/lib/action/GithubAuthAction.class.php +++ b/wcfsetup/install/files/lib/action/GithubAuthAction.class.php @@ -6,6 +6,7 @@ use GuzzleHttp\Psr7\Request; use Laminas\Diactoros\Response\RedirectResponse; use Psr\Http\Client\ClientExceptionInterface; use wcf\data\user\User; +use wcf\form\AccountManagementForm; use wcf\form\RegisterForm; use wcf\system\event\EventHandler; use wcf\system\exception\NamedUserException; @@ -145,7 +146,11 @@ final class GithubAuthAction extends AbstractOauth2Action WCF::getSession()->register('__oauthUser', $oauthUser); return new RedirectResponse( - LinkHandler::getInstance()->getLink('AccountManagement') . '#3rdParty' + LinkHandler::getInstance()->getControllerLink( + AccountManagementForm::class, + [], + '#3rdParty' + ) ); } else { // This account does not belong to anyone and we are not logged in. diff --git a/wcfsetup/install/files/lib/action/GoogleAuthAction.class.php b/wcfsetup/install/files/lib/action/GoogleAuthAction.class.php index dfbe3a12e4..69638cf66c 100644 --- a/wcfsetup/install/files/lib/action/GoogleAuthAction.class.php +++ b/wcfsetup/install/files/lib/action/GoogleAuthAction.class.php @@ -5,6 +5,7 @@ namespace wcf\action; use GuzzleHttp\Psr7\Request; use Laminas\Diactoros\Response\RedirectResponse; use wcf\data\user\User; +use wcf\form\AccountManagementForm; use wcf\form\RegisterForm; use wcf\system\event\EventHandler; use wcf\system\exception\NamedUserException; @@ -167,7 +168,11 @@ final class GoogleAuthAction extends AbstractOauth2Action WCF::getSession()->register('__oauthUser', $oauthUser); return new RedirectResponse( - LinkHandler::getInstance()->getLink('AccountManagement') . '#3rdParty' + LinkHandler::getInstance()->getControllerLink( + AccountManagementForm::class, + [], + '#3rdParty' + ) ); } else { // This account does not belong to anyone and we are not logged in.