From: joshuaruesweg Date: Wed, 3 Jun 2020 19:59:58 +0000 (+0200) Subject: Set email confirmation status on email activation X-Git-Tag: 5.3.0_Alpha_1~182^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dbe3e4c2f4b9dc80dbda5a6dfa55dd1655274306;p=GitHub%2FWoltLab%2FWCF.git Set email confirmation status on email activation --- diff --git a/wcfsetup/install/files/lib/form/EmailActivationForm.class.php b/wcfsetup/install/files/lib/form/EmailActivationForm.class.php index b05d1e8691..ee902b68f7 100644 --- a/wcfsetup/install/files/lib/form/EmailActivationForm.class.php +++ b/wcfsetup/install/files/lib/form/EmailActivationForm.class.php @@ -97,9 +97,12 @@ class EmailActivationForm extends AbstractForm { 'newEmail' => '', 'reactivationCode' => 0 ]; - if ($this->user->activationCode != 0 && REGISTER_ACTIVATION_METHOD & 1) { - // @TODO - $data['activationCode'] = 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