Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Membership Login / Logout Page Redirect

 

 


nmsinc
User

Sep 10, 2011, 10:58 AM

Post #1 of 7 (2384 views)
Shortcut
Membership Login / Logout Page Redirect Can't Post

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?



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

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



Thanks

Ray


Dave
Staff / Moderator


Sep 10, 2011, 11:15 AM

Post #2 of 7 (2383 views)
Shortcut
Re: [nmsinc] Membership Login / Logout Page Redirect [In reply to] Can't Post

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
 


nmsinc
User

Sep 10, 2011, 1:03 PM

Post #3 of 7 (2378 views)
Shortcut
Re: [Dave] Membership Login / Logout Page Redirect [In reply to] Can't Post

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!


nmsinc
User

Sep 10, 2011, 1:57 PM

Post #4 of 7 (2376 views)
Shortcut
Re: [nmsinc] Membership Login / Logout Page Redirect [In reply to] Can't Post

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:



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


Dave
Staff / Moderator


Sep 11, 2011, 12:01 AM

Post #5 of 7 (2373 views)
Shortcut
Re: [nmsinc] Membership Login / Logout Page Redirect [In reply to] Can't Post

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

Easier to see in a fixed width font:

Code
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
 


nmsinc
User

Sep 11, 2011, 9:12 AM

Post #6 of 7 (2363 views)
Shortcut
Re: [Dave] Membership Login / Logout Page Redirect [In reply to] Can't Post

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 websiteMembership.php for your review!

Thanks
Attachments: websiteMembership.php (4.88 KB)


robin
User / Moderator


Sep 12, 2011, 10:01 AM

Post #7 of 7 (2313 views)
Shortcut
Re: [nmsinc] Membership Login / Logout Page Redirect [In reply to] Can't Post

Hey Ray,

I can't reproduce the problem here. Could you submit a 2nd Level Support Request? Then we can take a close look at what's going on.

Thanks,
Robin