From cfd0c572581321a7359e541f87d9a9c625b252b4 Mon Sep 17 00:00:00 2001 From: Peter Lohse Date: Fri, 31 Jan 2020 13:42:29 +0100 Subject: [PATCH] Event added for changing variable $registerVia3rdParty in wcf\form\RegisterForm Closes #3143 [Tim: Made the changes requested in #3143] --- wcfsetup/install/files/lib/form/RegisterForm.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/lib/form/RegisterForm.class.php b/wcfsetup/install/files/lib/form/RegisterForm.class.php index bd8af469f5..5a64e1a092 100644 --- a/wcfsetup/install/files/lib/form/RegisterForm.class.php +++ b/wcfsetup/install/files/lib/form/RegisterForm.class.php @@ -17,6 +17,7 @@ use wcf\system\email\mime\RecipientAwareTextMimePart; use wcf\system\email\Email; use wcf\system\email\Mailbox; use wcf\system\email\UserMailbox; +use wcf\system\event\EventHandler; use wcf\system\exception\NamedUserException; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\SystemException; @@ -423,6 +424,14 @@ class RegisterForm extends UserAddForm { // create fake password $this->password = bin2hex(\random_bytes(20)); } + + $eventParameters = [ + 'saveOptions' => $saveOptions, + 'registerVia3rdParty' => $registerVia3rdParty, + ]; + EventHandler::getInstance()->fireAction($this, 'registerVia3rdParty', $eventParameters); + $saveOptions = $eventParameters['saveOptions']; + $registerVia3rdParty = $eventParameters['registerVia3rdParty']; $this->additionalFields['languageID'] = $this->languageID; if (LOG_IP_ADDRESS) $this->additionalFields['registrationIpAddress'] = WCF::getSession()->ipAddress; -- 2.20.1