Get User based on RBAC role / task

Hi there,

i use yii with rights extension for a few weeks but now I ran into a problem I couldnt find a solution for.

I have a task "notification". When a special action occurs I want to send every user assigned with the "notification" task an email. But how do I get all users assigned to this task. The email is stored in the users database. Also there could be a role with the notification task.

Can anybody help me? Thank you


Hi NetRacer, I have the same problem. Did you found a a workaround for it?


its not a big deal to send a notification to user…!!!

you just need to get all the user to whom you want to send a email …then just right a code for mailing in a loop.which will send a mail to user…

if you need more specific answer then please elaborate it in more details…so i can help you a bit more…

I think I understand the problem and have it too.

Is there a way to get all users assigned to a specific role (maybe task or operation too)?

I can get roles of an user, but not the other way around. Suppose I have a role admin and I want to get a list of all users that assigned in that role without getting all users in my database and checking them one by one in a loop to know which ones are admins.

I even think in creating a relation in my database between my user table and Yii AuthAssignment table, but since my primary key is an integer and Yii uses varchar(64) for userid, I couldn´t create a foreign key.

Anyone have an ideia?