Extension, Module

Archived
Forum
(read-only)

Member categories

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

Do Super Admin accounts override category check?

General

Jason Turcotte
Jason Turcotte

I’m using this code:

{exp:member_categories:check category_id="4|8|9|12|13"}    
 
...stuff...
 
{if no_results}
  
<p>You are not able to view this training module.</p>
 
{/if}
{
/exp:member_categories:check} 

When logged in as the Super Admin account, I am able to see the “stuff’’ even though that account does not belong to the categories listed for category_id.

Is this by design?

Yuri Salimovskiy
# 1
Developer
Yuri Salimovskiy

Hi Jason,

no, that should not happen. Is that exact code that you’re using? Also, double check that member is really not in one of listed catwgories. If your have {exp:channel:entries} (or other tags) around (or inside) {exp:member_categories:check} - make sure it has {if no_results} portion as well.
{if no_results} is known to not work correctly inside nested tags unless it’s provided for each tag pair.

Jason Turcotte
# 2
Jason Turcotte

That code above is wrapped in {if logged_in} tags, but otherwise exactly what you see there.

For what it’s worth, we’re using Structure on this site as well.

Yuri Salimovskiy
# 3
Developer
Yuri Salimovskiy

Would you be able to email me username & pass for that member so I could see myself? support@intoeetive.com

Jason Turcotte
# 4
Jason Turcotte

Yuri, this particular issue has taken a back seat in our timeline. I will reach out again when that project’s priority creeps up again. Thanks!

Jason Turcotte
# 5
Jason Turcotte

Finally got around to this item again. Turns out it was me. Thanks anyways!

The user was indeed part of one of the allowed categories.