use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\util\HeaderUtil;
-use wcf\util\StringUtil;
use wcf\util\UserUtil;
/**
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);
private function validateUsername(TextFormField $formField): void
{
- $value = StringUtil::trim($formField->getValue());
+ $value = $formField->getValue();
$this->user = User::getUserByUsername($value);
if (!$this->user->userID) {
return;
}
- if (!\hash_equals($this->user->emailConfirmed, StringUtil::trim($formField->getValue()))) {
+ if (!\hash_equals($this->user->emailConfirmed, $formField->getValue())) {
$formField->addValidationError(
new FormFieldValidationError(
'invalid',