-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Short description of the issue
According to the forum discussion at https://processwire.com/talk/topic/5727-finding-users-by-not-roles/#comment-149255 I am discovering a problem to find users excluding a certain role by name.
So fe. if I am looking for all users which does not have the role "login-facebook" I have tried to find them like this:
$users->find("roles!=login-facebook");
Unfortunately the "not" (= !=) selector doesnt work in this case. It is only working if I use the id of the role instead like this:
$users->find("roles!=33501");
On the opposite if I search for all users with the role "login-facebook" (including not excluding) it works well.
Expected behavior
Usually the name of the role should work to exclude some users from the array. Only users without this selector should be listed.
Actual behavior
Doesnt take account if the name of the role is used. All users were listed (independent if they have the role or not). If the role id is used instead of the role name everthing works fine.
- ProcessWire version: 3.0.71
- (Optional) PHP version: 7