Hi Jason
Thank you for your reply and help.
I’ll step through your suggestions and see how it goes.
I have tried the Rest Roles several times.
Can you please confirm that you ran the tests on the S2 protected login page and that this was done on Word Press 3.5 ?
The following piece of code works fine and returns the correct condition for the Level 1 member ID
<?php
if(user_is(29, "subscriber"))
echo 'User ID# 29 is a Free Subscriber at Level #0.';
else if(user_is(29, "s2member_level1"))
echo 'User ID# 29 is a Member at Level #1.';
else if(user_can(29, "access_s2member_level2"))
echo 'User ID# 29 has access to content protected at Level #2.';
# But, (important) they could actually be a Level #3 or #4 Member;
# because Membership Levels provide incremental access.
?>
<?php
if(user_is(28, "subscriber"))
echo 'User ID# 28 is a Free Subscriber at Level #0.';
else if(user_is(28, "s2member_level1"))
echo 'User ID# 28 is a Member at Level #1.';
else if(user_can(28, "access_s2member_level2"))
echo 'User ID# 28 has access to content protected at Level #2.';
# But, (important) they could actually be a Level #3 or #4 Member;
# because Membership Levels provide incremental access.
?>
Which to me looks like a problem in the if(current_user_is(“s2member_level1”)).
The function http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_current_user_is%28%29
implies a change at version 3.5 (I assume this is Word Press) as follows:
“Since:
3.5
Parameters:
str $role – A WordPress® Role ID ( i.e. s2member_level[0-9]+, administrator, editor, author, contributor, subscriber ).
Returns:”