How To Add A Role To Yii-User Extension

I installed the yii user extension and now i am wandering how i can add an extra role. I added a new column in the User db table called ‘type’ and edited the modules/user/UserModule.php like this:

public static function isEmployee() {


            return false;

        else {

            if (!isset(self::$_employee)) {

                            //check to see what kind of user we got and include admin for all 


                    self::$_employee = true;


                    self::$_employee = false;   


            return self::$_employee;



and then when i try calling this in the rest of my site it dose not seem to work

for eg in the main.php

'visible' => Yii::app()->user->isEmployee()

What am i doing wrong or what would be the best way to add an extra role that i can call on the site as above.

I think you’re confused with Yii::app()->getModule(‘user’), Yii::app()->user is an object of class WebUser, which is in modules/user/components.

i tried also Yii::app()->getModule(‘user’), it dose not work either, i mean it works it gives no error but its not giving me a true or false , its always empty