コード例 #1
0
 public function validate()
 {
     $record = user_userForName($this->value);
     if ($record) {
         $this->isValid = false;
     } else {
         $this->isValid = true;
     }
 }
コード例 #2
0
 private function authenticateWithScreenname($form)
 {
     $user = user_userForName($form->username);
     if ($user) {
         $this->authenticateWithUserAndPassword($user, $form->password);
         $user->release();
     } else {
         $this->prepareErrors();
     }
 }