From 0283b2055d828292ebf77b5084fcdef21ff15b64 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 10 Sep 2014 17:42:39 +0200 Subject: [PATCH] Fixed editing account settings --- src/FormData/UserEditFormData.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/FormData/UserEditFormData.php b/src/FormData/UserEditFormData.php index 983d279d..f5b4cc4c 100644 --- a/src/FormData/UserEditFormData.php +++ b/src/FormData/UserEditFormData.php @@ -27,19 +27,19 @@ class UserEditFormData implements \Szurubooru\IValidatable public function validate(\Szurubooru\Validator $validator) { if ($this->userName !== null) - $this->validator->validateUserName($formData->userName); + $validator->validateUserName($this->userName); - if ($formData->password !== null) - $this->validator->validatePassword($formData->password); + if ($this->password !== null) + $validator->validatePassword($this->password); - if ($formData->email !== null) - $this->validator->validateEmail($formData->email); + if ($this->email !== null) + $validator->validateEmail($this->email); - if ($formData->browsingSettings !== null) + if ($this->browsingSettings !== null) { - if (!is_string($formData->browsingSettings)) + if (!is_string($this->browsingSettings)) throw new \InvalidArgumentException('Browsing settings must be stringified JSON.'); - else if (strlen($formData->browsingSettings) > 2000) + else if (strlen($this->browsingSettings) > 2000) throw new \InvalidArgumentException('Stringified browsing settings can have at most 2000 characters.'); } }