Jump to content

How to select all users who don't have a certain role?


FlorianA
 Share

Recommended Posts

It's easy to select all users who have a certain role. E. g.:

users('roles=foo|bar')

selects all users who have at least one of the roles "foo" or "bar". But I failed doing the opposite: selecting all users who don't have role "foo" or don't have role "bar". I even don't manage the case with only one role. Any ideas?

Link to comment
Share on other sites

21 hours ago, adrian said:

To avoid anything from your template file that might be contributing, can you try this in the Tracy Console panel:

Tracy Console? ... <google> ... Tracy Debugger ... Wow! What a wonderful tool! I should have discoverd that earlier. I think it would deserve a place on https://processwire.com/docs/tutorials/  :rolleyes:

Anyway, my problem persists even when trying the command above. My PW version is 3.0.61

  • Like 1
Link to comment
Share on other sites

Glad you made friends with Tracy :)

My PW version is 3.0.61

That might be the problem. I would definitely recommend upgrading to the latest dev version. Many of us are using it on production sites and it will likely become 3.1 stable this week or next.

  • Like 3
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...