PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

bizarre behavior after logging in newly registered user

s2Member Plugin. A Membership plugin for WordPress®.

bizarre behavior after logging in newly registered user

Postby svillee » August 22nd, 2011, 4:56 pm

I have a WordPress site with s2Member Pro (build 110731) installed. I am using a PayPal Pro form to register a new user at level 1. The PayPal interaction proceeds normally, and when I return to my site, I get the message "Thank you. Your account has been approved. Please log in." However, when I try to log in, instead of going to the Login Welcome page, it gets redirected to this url:

Code: Select all
/?s2member_seeking=page-138&s2member_level_req=0


138 is the ID of the Login Welcome page. So even though I have entered the new username and password correctly, somehow it thinks I'm not logged in. At that point I'm in a kind of twilight zone where there's no easy way to log out. I have to manually enter this URL in order to log out:

Code: Select all
/wp-login.php?loggedout=true


This scenario is solidly reproducible. By adding some tracing code to plugins/s2member/includes/classes/pages.inc.php, I have determined that this code at lines 48 to 54 is deciding to redirect:

Code: Select all
                        $user = (is_user_logged_in ()) ? wp_get_current_user () : false; /* Get the current User's object. */
                        /**/
                        if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && $page_id == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && c_ws_plugin__s2member_no_cache::no_cache_constants (true) !== "nill" && (!$user || !current_user_can ("access_s2member_level0")) && $page_id != $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])
                           {
                              wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "page-" . $page_id, "s2member_level_req" => "0")), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ()));
                              exit ();
                           }


I have further determined that $user is false at this point, so is_user_logged_in() somehow returned false.

Any information on what the problem might be would be greatly appreciated. Thanks.
User avatar
svillee
Registered User
Registered User
 
Posts: 10
Joined: August 1, 2011

Re: bizarre behavior after logging in newly registered user

Postby Cristián Lávaque » August 23rd, 2011, 2:01 am

Thank you for reporting this.

Does your browser accept cookies? What browser are you using and have you tried with a different one too?

Could you update s2Member and s2Member Pro to the latest release (v110815) and try if the problem happens again?

If it does, could you please post the log entries for the transactions? WP Admin -> s2Member -> PayPal Options -> Account Details -> Enable Logging
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: bizarre behavior after logging in newly registered user

Postby svillee » August 23rd, 2011, 10:04 am

Thanks for your reply.

I upgraded to the 110815 build, and the problem was still there, under both Firefox and Internet Explorer.

However, the problem went away when I deactivated the DB Cache Reloaded Fix plugin, so evidently there is some conflict there. I don't really need this plugin, so I'm happy with this solution.
User avatar
svillee
Registered User
Registered User
 
Posts: 10
Joined: August 1, 2011

Re: bizarre behavior after logging in newly registered user

Postby Cristián Lávaque » August 23rd, 2011, 9:34 pm

Ah, got it. Thanks for reporting what the problem was. I'm glad you solved it! :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron