From 486c39614a51ca12b09015969bc7548c004c1d64 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Sun, 5 Jul 2020 10:42:10 +0200 Subject: [PATCH] Always confirm email on confirmEmail action --- .../files/lib/data/user/UserAction.class.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 9eed6f493b..310192b404 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -641,14 +641,13 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio public function confirmEmail() { if (empty($this->objects)) $this->readObjects(); - if (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN) { - (new UserAction($this->objects, 'update', [ - 'data' => [ - 'emailConfirmed' => null, - ] - ]))->executeAction(); - } - else { + (new UserAction($this->objects, 'update', [ + 'data' => [ + 'emailConfirmed' => null, + ] + ]))->executeAction(); + + if (!(REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN)) { $this->enable(); } -- 2.20.1