The CreatorCon Call for Content is officially open! Get started here.

User criteria script is not taking effect

Nisar2
Mega Guru

I've a catalog item for which the "Available For" and "Not Available For" values are as follows:

Nisar2_0-1692258197783.png

 

The user criteria record is as follows:

Nisar2_1-1692258236190.png


You can see that I'm defaulting it to "false", which means any user trying to access the item should not be able to. I then tried testing it via the "User Criteria Diagnostics" module and found the following result:

Nisar2_2-1692258303628.png

Why does it say that the user "Can view" the catalog item when the criteria says "false"?

 

I tried:

  • Using cache.do
  • Logging out and logging back in

But still got the same result.

 

What am I missing here?

1 ACCEPTED SOLUTION

Niklas Peterson
Mega Sage

Hi,

 

Doesn't Not available for == False means it is available? You need to reverse the logic.

Regards,
Niklas

View solution in original post

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Can you replace line 1 as below

answer=checkUser();

Tried that as well. No luck.