Remove obsolete code
authorMarcel Werk <burntime@woltlab.com>
Tue, 28 Nov 2023 13:39:42 +0000 (14:39 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 28 Nov 2023 13:39:42 +0000 (14:39 +0100)
wcfsetup/install/files/lib/form/LostPasswordForm.class.php
wcfsetup/install/files/lib/form/RegisterActivationForm.class.php

index 370c36c2831d7b271a8ca05897f3ccca45e59bc6..bb7b342708db51e86c54449f5d0eb12785054d94 100644 (file)
@@ -19,7 +19,6 @@ use wcf\system\form\builder\field\validation\FormFieldValidator;
 use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\HeaderUtil;
-use wcf\util\StringUtil;
 use wcf\util\UserUtil;
 
 /**
@@ -65,7 +64,7 @@ final class LostPasswordForm extends AbstractFormBuilderForm
 
     private function validateUsername(TextFormField $formField): void
     {
-        $value = StringUtil::trim($formField->getValue());
+        $value = $formField->getValue();
         $this->user = User::getUserByUsername($value);
         if (!$this->user->userID) {
             $this->user = User::getUserByEmail($value);
index 2b4d1fa714405ccabaf254a8ed6288b7bf6965b0..0eccb1fc0b322aa368170cb7fdde103c20caa9d3 100644 (file)
@@ -61,7 +61,7 @@ final class RegisterActivationForm extends AbstractFormBuilderForm
 
     private function validateUsername(TextFormField $formField): void
     {
-        $value = StringUtil::trim($formField->getValue());
+        $value = $formField->getValue();
         $this->user = User::getUserByUsername($value);
 
         if (!$this->user->userID) {
@@ -94,7 +94,7 @@ final class RegisterActivationForm extends AbstractFormBuilderForm
             return;
         }
 
-        if (!\hash_equals($this->user->emailConfirmed, StringUtil::trim($formField->getValue()))) {
+        if (!\hash_equals($this->user->emailConfirmed, $formField->getValue())) {
             $formField->addValidationError(
                 new FormFieldValidationError(
                     'invalid',