public function validate() { $record = user_userForName($this->value); if ($record) { $this->isValid = false; } else { $this->isValid = true; } }
private function authenticateWithScreenname($form) { $user = user_userForName($form->username); if ($user) { $this->authenticateWithUserAndPassword($user, $form->password); $user->release(); } else { $this->prepareErrors(); } }