21 $record =
Users::model()->findByAttributes(array(
'username' => $this->username));
23 $this->errorCode = self::ERROR_USERNAME_INVALID;
24 else if ($record->password !== $this->password)
25 $this->errorCode = self::ERROR_PASSWORD_INVALID;
27 $this->_id = $record->userid;
29 $this->errorCode = self::ERROR_NONE;
31 return !$this->errorCode;