From dbe3e4c2f4b9dc80dbda5a6dfa55dd1655274306 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Wed, 3 Jun 2020 21:59:58 +0200 Subject: [PATCH] Set email confirmation status on email activation --- .../install/files/lib/form/EmailActivationForm.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.20.1