public function setData($formType = '', $method = 'INPUT_POST') { $this->login = Validate::validateInputVar('username', $method, 'str'); $this->password = Validate::validateInputVar('pass', $method, 'str'); $this->remember = Validate::validateInputVar('remember', $method, 'int'); if ($formType === 'reg' || $formType === 'registration') { $this->fullName = Validate::validateInputVar('fullName', $method, 'str'); $this->email = Validate::validateInputVar('email', $method, 'email'); $this->photo = $_FILES['photo']['name']; $this->validateKey = Generator::generate(10); $this->path = Path::USERIMG_UPLOAD_DIR; $this->dpassword = Validate::validateInputVar('dpass', $method, 'str'); $this->setAddressesAndPhones(); return $this->password === $this->dpassword ? TRUE : FALSE; } }