From: Peter Lohse Date: Fri, 31 Jan 2020 12:42:29 +0000 (+0100) Subject: Event added for changing variable $registerVia3rdParty in wcf\form\RegisterForm X-Git-Tag: 5.2.7~43^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cfd0c572581321a7359e541f87d9a9c625b252b4;p=GitHub%2FWoltLab%2FWCF.git Event added for changing variable $registerVia3rdParty in wcf\form\RegisterForm Closes #3143 [Tim: Made the changes requested in #3143] --- 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;