How Do I Get The Default User Management

am newin yii. i desparately need to remove the default yii user management. I have created the user table on my database. have the model in place and the crud components are ready. useridentity code looks like

$users= User::model()->findByAttributes(array(‘username’=>$this->username));

        if($users===null) {


            $this->errorCode = self::ERROR_USERNAME_INVALID;                


        }


        else if(!$users->validatePassword($this->password)) {


            $this->errorCode = self::ERROR_PASSWORD_INVALID;


        }


        else {           


            $this->errorCode = self::ERROR_NONE;


            $this->_id = $users->id;


        }


        return !$this->errorCode;


    }


    


    public function getId() {


        return $this->_id;


    }

please assist

Any specific problems?

yes. I need to use the login form. validate with what is in the database. and load the index.php page of my site if the username and password are correct.

ps> thanks for replying

I’m pretty sure this is already done in the initial Yii installation, you can use it as example.

You may also want to read this carefully:

http://www.yiiframework.com/doc/guide/1.1/en/topics.auth

PS. Plz try to be more specific, like “I’ve tried this, and get that error”.