From: joshuaruesweg Date: Thu, 18 Jun 2020 08:43:29 +0000 (+0200) Subject: Enable user if he confirms a new email X-Git-Tag: 5.3.0_Alpha_1~182^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06386d07d7da10fe077da49b87279b2d6475b8df;p=GitHub%2FWoltLab%2FWCF.git Enable user if he confirms a new email --- diff --git a/wcfsetup/install/files/lib/form/EmailActivationForm.class.php b/wcfsetup/install/files/lib/form/EmailActivationForm.class.php index ee902b68f7..17b31bbd6b 100644 --- a/wcfsetup/install/files/lib/form/EmailActivationForm.class.php +++ b/wcfsetup/install/files/lib/form/EmailActivationForm.class.php @@ -97,19 +97,20 @@ class EmailActivationForm extends AbstractForm { 'newEmail' => '', 'reactivationCode' => 0 ]; - if (!$this->user->isEmailConfirmed() && (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_USER)) { - $data['emailConfirmed'] = null; - - if (!(REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN)) { - $data['activationCode'] = 0; - } - } // enable new email $this->objectAction = new UserAction([$this->user], 'update', [ 'data' => array_merge($this->additionalFields, $data) ]); $this->objectAction->executeAction(); + + // confirm email + if (!$this->user->isEmailConfirmed() && empty($this->user->blacklistMatches)) { + // enable new email + $this->objectAction = new UserAction([$this->user], 'confirmEmail'); + $this->objectAction->executeAction(); + } + $this->saved(); // forward to index page