Page 1 of 1

current_user_can_for_blog function implementation

PostPosted: January 11th, 2012, 12:01 pm
by fitcajun
Hey guys,

I’m learning as I go here, and I am having trouble implementing a conditional function on a multisite blog. Here is the error I get:

Fatal error: s2If, unsafe conditional function [ current_user_can_for_blog(1,access_s2member_level2) ] in /data/15/2/81/110/2570110/user/2817683/htdocs/blog1/wp-content/plugins/s2member/includes/classes/sc-if-conds-in.inc.php on line 152

Here is the code on the page:

[s2If current_user_can_for_blog(1,access_s2member_level2) AND current_user_is_not_for_blog(1,s2member_level2)]
For video instructions (3:43), click here (requires an 'Athlete' membership)
[/s2If]

What am I doing wrong?

The code is located on a page on blog 3 and the content I wish to link to is located on blog 1.

Re: current_user_can_for_blog function implementation

PostPosted: January 13th, 2012, 4:27 pm
by Raam Dev
Could you try installing the PHP Execution and using the PHP version of the conditional (WP Admin -> s2Member -> API/Scripting -> Advanced/PHP Conditionals) to see if that fixes the problem?