Rename function to `redirectToRegistration`
authorCyperghost <olaf_schmitz_1@t-online.de>
Tue, 23 Apr 2024 12:07:52 +0000 (14:07 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Tue, 23 Apr 2024 12:07:52 +0000 (14:07 +0200)
wcfsetup/install/files/lib/action/AbstractOauth2AuthAction.class.php
wcfsetup/install/files/lib/action/GithubAuthAction.class.php

index ca675d609b09402884076a5b727af205bb266cad..878b7d8b8c9c84f58db3936308c10b2aa366e4f3 100644 (file)
@@ -293,7 +293,7 @@ abstract class AbstractOauth2AuthAction implements RequestHandlerInterface
             } else {
                 // This account does not belong to anyone and we are not logged in.
                 // Thus we want to connect this account to a newly registered user.
-                return $this->performeRegister($oauthUser);
+                return $this->redirectToRegistration($oauthUser);
             }
         }
     }
@@ -321,7 +321,7 @@ abstract class AbstractOauth2AuthAction implements RequestHandlerInterface
         );
     }
 
-    protected function performeRegister(OauthUser $oauthUser): ResponseInterface
+    protected function redirectToRegistration(OauthUser $oauthUser): ResponseInterface
     {
         WCF::getSession()->register('__oauthUser', $oauthUser);
         WCF::getSession()->register('__username', $oauthUser->getUsername());
index 51160548af51e96ff8d5ae0ee80cb016f216e6a9..cf01aca6f3c406e75ae3bffbbe37fe8a834232b8 100644 (file)
@@ -98,7 +98,7 @@ final class GithubAuthAction extends AbstractOauth2AuthAction
     }
 
     #[\Override]
-    protected function performeRegister(OauthUser $oauthUser): ResponseInterface
+    protected function redirectToRegistration(OauthUser $oauthUser): ResponseInterface
     {
         try {
             $request = new Request('GET', 'https://api.github.com/user/emails', [
@@ -120,6 +120,6 @@ final class GithubAuthAction extends AbstractOauth2AuthAction
         } catch (ClientExceptionInterface $e) {
         }
 
-        return parent::performeRegister($oauthUser);
+        return parent::redirectToRegistration($oauthUser);
     }
 }