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.
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.