View Single Post
Old 05-16-2011, 08:52 PM
Nathan D.'s Avatar
Nathan D. Nathan D. is offline
Junior Member
Join Date: Apr 2011
Posts: 3
Default One issue

In testing, it seems that I overlooked one issue (so far):

If a user registers for an account they need to be approved for a wholesale account (LevelX). Until that happens, they are a Level0 and should still not see certain areas of the site (pricing, minicart and Ecwid sign in). However, using the method above - the will be able to see that stuff due to my using of the standard "if logged in" code.

What should be used instead is:
PHP Code:
if (current_user_is("s2member_levelX")){ 
in place of
PHP Code:
if ( is_user_logged_in() ) { 
This way, they can still log in to WordPress but won't be allowed to view the content we want to hide.

There are more examples in the S2Member > API /Scripting > Using Advanced Conditionals section of the plugin.