Membership Login / Logout Page Redirect

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

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

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: [Dave] Membership Login / Logout Page Redirect

It now takes the user back to the login screen and not the page that page that called the login prompt- I have up-loaded the [font "Verdana"]websiteMembership.php for your review![/#000000]

[font "Verdana"]Thanks[/#000000]
nmsinc
Attachments:

websitemembership.php 5K

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