Answer the question
In order to leave comments, you need to log in
How to unbind all roles from a user?
Hi friends!
When reassigning a role to a user, it is necessary to untie all the roles that he currently has (this is required by the application architecture). There is an assign() method, but I didn't find an unsign method or similar.
Of course, there is an option to simply cut out the entries from the auth_assignment table, but suddenly a more elegant solution for this was lying around in yii. Who knows?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question