Improve error handling in register activation form
authorMarcel Werk <burntime@woltlab.com>
Mon, 27 Nov 2023 17:20:08 +0000 (18:20 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 27 Nov 2023 17:20:08 +0000 (18:20 +0100)
wcfsetup/install/files/lib/form/RegisterActivationForm.class.php

index ab4c320a72990865c6c150c4da16645610d03817..2b4d1fa714405ccabaf254a8ed6288b7bf6965b0 100644 (file)
@@ -74,6 +74,7 @@ final class RegisterActivationForm extends AbstractFormBuilderForm
                     ]
                 )
             );
+            return;
         }
 
         if ($this->user->isEmailConfirmed()) {
@@ -89,7 +90,7 @@ final class RegisterActivationForm extends AbstractFormBuilderForm
 
     private function validateActivationCode(TextFormField $formField): void
     {
-        if (!isset($this->user)) {
+        if (!isset($this->user) || !$this->user->emailConfirmed) {
             return;
         }