Doub about authentication

Hello Friends

I’m studying Yii and I would like some help about RBAC, I was config the main.php:


			'connectionString' => 'mysql:host=localhost;dbname=fidelity',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => '',

			'charset' => 'utf8',






I modify the class UserIdentity to use my class Usuarios and its working.



 * UserIdentity represents the data needed to identity a user.

 * It contains the authentication method that checks if the provided

 * data can identity the user.


class UserIdentity extends CUserIdentity


    private $_id;

    public function authenticate()





        else if($record->senha!==$this->password)





            $this->setState('title', $record->nome);



        return !$this->errorCode;



    public function getId()


        return $this->_id;



But I don’t know what I need to use RBAC, I was reading this article:

I understand the logic but I don’t know what I need do!

The RBAC is a file? If yes, where I should put it?

After this what I should do?

I’m from Brazil and my english is not very well. Sorry

rbac is a strategy for user auth…


I know it, but I don´t understand how to use. I need a example. Could someone explain to me?

I found this guide tremendously helpful.