Membership Login / Logout Page Redirect

By nmsinc - September 10, 2011

Using Membership 1.05 with CMS 2.11 – The websiteMembership.php lines 17 and 18 listed below allow for a redirect back to the page that the login or logout were called from, however, it always takes the user back to the home page and not the last page that called the action. Any suggestions?[/#000000]

[/#000000]

$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL'] = '/'; // user gets redirected to last page that called websiteLogin_redirectToLogin() or here if none[/#000000]

$GLOBALS['WEBSITE_LOGIN_POST_LOGOFF_URL'] = '/'; // user gets redirected to last page that called websiteLogin_redirectToLogin() or here if none[/#000000]

[/#000000]

Thanks[/#000000]

Ray[/#000000]
nmsinc

Re: [nmsinc] Membership Login / Logout Page Redirect

By Dave - September 10, 2011

Hi Ray,

Right now it's redirecting back to / which is likely your homepage. Try removing the slash like this so no value if specified:

$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL'] = '';
$GLOBALS['WEBSITE_LOGIN_POST_LOGOFF_URL'] = '';

Let me know if that works for you!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Membership Login / Logout Page Redirect

By nmsinc - September 10, 2011

I receive a parse error when I make this change, however, I will be using this with your new ‘Comments’ plugin so this may not be an issue once I get this plugin going![/#000000]
nmsinc

Re: [nmsinc] Membership Login / Logout Page Redirect

By nmsinc - September 10, 2011

I have the Comments section working now and the redirect still takes users back to the home page. Using your previous suggestion provided an error code as follows:[/#000000]

[/#000000]

Parse error: syntax error, unexpected T_STRING in /home/expedient/www/expedientcsi.com/cmsAdmin/plugins/websiteMembership_1.05/websiteMembership.php on line 18[/#000000]
nmsinc

Re: [nmsinc] Membership Login / Logout Page Redirect

By Dave - September 11, 2011

Make sure you have two single quotes '' and not one double ".

Easier to see in a fixed width font:
Make sure you have two single quotes '' and not one double ".

If that doesn't fix it attach the website membership.php or post line 18 and the lines around it and I'll take a look.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [nmsinc] Membership Login / Logout Page Redirect

By robin - September 12, 2011

Hey Ray,

I can't reproduce the problem here. Could you submit a [url http://www.interactivetools.com/support]2nd Level Support Request[/url]? Then we can take a close look at what's going on.

Thanks,
Robin
Robin
Programmer
interactivetools.com