Closed da-moon closed 8 years ago
You mean delete all users from the database which are in some role? Or you mean remove users from a role, but keep them in the database?
For first, for v1.0 you can use Roles.getUsersInRole
to get a cursor of all users and then you can iterate over and remove them.
For second you could combine this with removeUsersFromRoles
.
In v2.0 you can use Roles._usersInRoleQuery
to get a query which you can use directly to remove users from the database.
I am trying to to finish my database seeder. I would like to know if there are any methods that elets all the users from a certain role or group