Consistently use `getControllerLink` in Facebook|Github|GoogleAuthAction
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 12 Aug 2021 11:45:54 +0000 (13:45 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 12 Aug 2021 11:45:54 +0000 (13:45 +0200)
wcfsetup/install/files/lib/action/FacebookAuthAction.class.php
wcfsetup/install/files/lib/action/GithubAuthAction.class.php
wcfsetup/install/files/lib/action/GoogleAuthAction.class.php

index 3d9ede13e37df846d465221c2175ca7849c1d5b4..8c2718e4b8143d9bbbb33eabd5cce80bfa1b9345 100644 (file)
@@ -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.
index 22c5e3356604a92655cac1970b15d4aa8cc149e7..62b6ce05700885944c01ab6c3b4cbfd73b669327 100644 (file)
@@ -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.
index dfbe3a12e43a03e36c765f779c4245ea65dfed29..69638cf66c878a6aa2e900a281fd1af907138667 100644 (file)
@@ -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.