Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User find excluding selector doesnt work properly #344

Closed
juergenweb opened this issue Aug 16, 2017 · 2 comments
Closed

User find excluding selector doesnt work properly #344

juergenweb opened this issue Aug 16, 2017 · 2 comments

Comments

@juergenweb
Copy link

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
ryancramerdesign added a commit to processwire/processwire that referenced this issue Aug 22, 2017
…-equals operator in FieldtypePage selector
@ryancramerdesign
Copy link
Member

Thanks, I've pushed a fix for this issue.

foobarlab pushed a commit to foobarlab/processwire that referenced this issue Sep 15, 2017
…-equals operator in FieldtypePage selector
@netcarver
Copy link
Collaborator

@juergenweb Hello! Could you please close this issue if it is fixed to your satisfaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants