Thank you for reporting this.
Could you show me a screenshot of your access level settings? You can use imgur.com
You should be able to restrict access too posts containing multiple categories, ie. if a post contains at least 1 restricted category, the post should be restricted as well. There might of course be a bug, so I will try to see if I can reproduce the error you are experiencing.
I think I’m having the same issue. It was working fine up until the last update. Now all the users with 2 roles don’t have access to the restricted pages.
Here’s screenshots and proof…
Here are two users. One with Subscriber role and one with 2 roles (Subscriber and ‘aMember Active’): https://imgur.com/a/FZe90
(Note aMember Active is lower than Subscriber – I believe this second role is why it’s denined)
Here’s the Restrict User Access plugin restricting users below ‘subscriber’ to not access ‘comps and opportunities page’
View post on imgur.com
When logged in with the test user who has 2 roles, it redirects me:
View post on imgur.com
But the user who’s ONLY a subscriber, it works:
View post on imgur.com
Please review changes from previous update. The highest given role needs to trump the lowest given role. It’s currently blocking users with aMember Active role even if they also have Subscriber role. This is cause issues as our membership application is fairly complex and it needs to have both of some users.
@mdmacek248
I just tried to test your use case by restricting a specific category and then going to a post that had multiple categories. Unfortunately I could not reproduce the problem.
Would it be possible for you to show me some screenshots of your access levels?
@kbrian
Thank you for reporting this, and thank you for providing so many details.
It does not sound like this is the same problem, as @mdmacek248 were referring to not being able to restrict posts with multiple categories, not multiple roles.
Nothing has really changed in the code regarding User Roles in the last few releases, except being able to synchronize with all logged in users as well, but I did take a look in the code just now to see if I could find any bugs.
Did you recently update any other plugin, and what was the previous version of Restrict User Access you used before the problem occured?
The “aMember” role is created by another plugin, correct?
Thanks so much for replying so fast. Apologies for hijacking the question. It is indeed. aMember is a paid solution connecting to WordPress via plugin. Their system hasn’t updated in ages but if you don’t think the error is a from your plugin I’ll contact their support. Thank you for your response.
Joachim,
Thank you for trying to replicate the problem. Unfortunately I removed the plugin because since it was not working for me. I will try it again in the future as I really need this functionality and I am not able to find any other plugins that work for my use case. I think it must be that I am doing something wrong. This is my first website so maybe I am just not understanding something.
@kbrian
In WordPress, the default behaviour is that users can only have 1 role. This can be changed in plugins like the one you’re using, and Restrict User Access ought to be able to handle it, but I will take a look.
Could you test something for me in the meantime? Instead of synchronizing with a specific Role, could you add the level to both members manually and see if that works?
@mdmacek248
Thank you for updating me on it, and I do acknowledge that the settings in the plugin might be hard to understand at first, especially for users new to WordPress. I am working on getting an official documentation out, so it’s easier to get started.