Hi,
database: test,
table name: users (user_id,username,password)
useridentity.php file.
public function authenticate()
{
$model=Users::model()->findByAttributes(array('username'=>$this->username));
//print MD5($this->password);
//print_r($model); exit;
if($model != NULL)
{
if($model->password==MD5($this->password))
$this->errorCode=self::ERROR_NONE;
else
$this->errorCode=self::ERROR_PASSWORD_INVALID;
}
else
{
$this->errorCode=self::ERROR_USERNAME_INVALID;
}
return !$this->errorCode;
}
usercontroller.php file set @ in accessRules()