latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Specific Conditional Help

Home Forums Community Forum Specific Conditional Help

This topic contains 2 replies, has 2 voices. Last updated by  Ian Durrant 3 years, 4 months ago.

Topic Author Topic
Posted: Wednesday Aug 21st, 2013 at 12:31 pm #56363

I am trying to create a conditional statement that allows all of level 1 to view some content on a page but also a specific user… this is what I am using but it doesn’t seem to like it…

[s2If current_user_can(access_s2member_level1) OR user_is(4, "s2member_level2")]

This is content for all level 1 users and also the user with the User ID of 4 who is a level 2 access. (level 2 access to level 1 content has been cut off by in normal circumstances by the Capability Manager plug-in)

[/s2If]

Anyone able to help me with forming a conditional that will provide access to this user id?

  • This topic was modified 3 years, 4 months ago by  Ian Durrant.

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Wednesday Aug 21st, 2013 at 8:10 pm #56379
Moderator
@duzman2000

Remove the double quotes (change user_is to current_user_is); you should be good :-)

[s2If current_user_can(access_s2member_level1) OR current_user_is(4,s2member_level2)]
	This is content for all level 1 users and also the user with the User ID of 4 who is a level 2 access. (level 2 access to level 1 content has been cut off by in normal circumstances by the Capability Manager plug-in)
[/s2If]
Posted: Thursday Aug 22nd, 2013 at 4:15 am #56415

Hi thanks for the prompt response, I’ve just tried that and I see the public content on the page now – I guess my quotes I was experimenting with stopped that working properly before – but I still don’t see the protected content when logged in as user 4. I wonder if the Capability Manager plug-in is overriding this to prevent it working correctly…?

I do have capability Manager set to prevent incremental access so level 2 can only see level 2, level one only level 1 etc as I tried to explain in protected text in the example of my first post but maybe I didn;t explain that so well :P

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.