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 and edited the UserModule
like this:
public static function isEmployee() {
if(Yii::app()->user->isGuest)
return false;
else {
if (!isset(self::$_employee)) {
//check to see what kind of user we got and include admin for all
if(self::user()->type)
self::$_employee = true;
else
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
'visible' => Yii::app()->user->isEmployee()
What i am doing wrong or what would be the best way to add an extra role that i can call on the site as above.