Jump to content

Selector on roles behaves differently than expected (bug?)


sz-ligatur
 Share

Recommended Posts

Hello @ryan, I had to change some role names on an existing site – after a while I recognized changed behavior for some role related functions. What I found is that using roles in selectors doesn't work exactly the same as I see on other fields:

$s1 = "roles=aaa";
$s2 = "roles=aaa|guest";
$s3 = "roles=aaa|guest|notavailable";

echo $users->find($s1);	//works, returns some users
echo $users->find($s2);	//works, returns some more users
echo $users->find($s3);	//returns empty pageArray !

As soon as I do an "OR" with a role, that does not exist, it wipes out the whole result set.  Is this the intended behavior? I guess not, but maybe you can tell me where I'm wrong.  Thank you!

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...