Always confirm email on confirmEmail action
authorjoshuaruesweg <ruesweg@woltlab.com>
Sun, 5 Jul 2020 08:42:10 +0000 (10:42 +0200)
committerjoshuaruesweg <ruesweg@woltlab.com>
Sun, 5 Jul 2020 08:42:10 +0000 (10:42 +0200)
wcfsetup/install/files/lib/data/user/UserAction.class.php

index 9eed6f493b55fb93a7cffdc617142597da07561e..310192b4046aeb186ed54d372a5751b64927d07c 100644 (file)
@@ -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();
                }