|
|
Due to the volume of spam happening on our forums, posting is now restricted to verified members only. If you're not verified, drop us a note with your username.
|
|
Home > FlexCMS Support Forum > User Help > General Support Requests > Guest access and username/pswd recovery
FlexCMS Support Forum
Guest access and username/pswd recovery Started January 7, 2013 @ 11:48am by Wolf
|
Post Message |
Wolf
Posts: 65 |
|
|
Guest access and username/pswd recovery | January 7, 2013 @ 11:48am | Hi David,
Back in the early days you helped me to create a block that prevents guests from accessing certain modules without being logged in (and it works perfectly)...
... except in two instances, I just discovered.
The orginal block code to do this was:
Code
if ($Arguments1 == 'news' || $Arguments1 == 'newsletter' || $Arguments1 == 'register' || $Arguments1 == 'register-submit' || $Arguments1 == 'store' || $Arguments1 == 'calendar' || $Arguments1 == 'forum' || $Arguments1 == 'chat') { header('Location: ' . $MainURL . '/pages/index.html'); }
|
|
However is a user isn't logged in and uses either of the "lost_password" or "lost_username" links in the main login page... they are ALSO redirected back to the index page.
It appears those two pages don't follow the exact same url path as modules. Do you think it would work if I added another check such as:
Code
if ($Arguments1 == 'lost_password' || $Arguments1 == 'lost_username') { header('Location: ' . $MainURL . Arguments1); }
|
|
So the finished code would be something like:
Code
if ($Arguments1 == 'news' || $Arguments1 == 'newsletter' || $Arguments1 == 'register' || $Arguments1 == 'register-submit' || $Arguments1 == 'store' || $Arguments1 == 'calendar' || $Arguments1 == 'forum' || $Arguments1 == 'chat') { header('Location: ' . $MainURL . '/pages/index.html'); }
if ($Arguments1 == 'lost_password' || $Arguments1 == 'lost_username') { header('Location: ' . $MainURL . Arguments1); }
|
|
Thanks! Wolf
|
|
|
|
Last Edit: January 7, 2013 @ 11:50am by Wolf | |
|
|
|
| |
DCSun Administrator
Posts: 625 |
|
|
| January 7, 2013 @ 1:19pm | Hey Wolf,
I don't think that's going to do what you're wanting, because it only runs the block code once you're already on that page, so that's just going to create a continuous loop.
Those two may go to a slightly different URL afterwards (+/- the "/pages" part I think is the difference you noticed), but other than that everything should work the same way so the old redirection code you had should still be okay. I think something else might be causing that redirection. Is there any other block code that might be? Email me the site and login info if you can't find anything and want me to take a look.
Dave
FlexCMS v3.2 Has Been Released! |
|
|
|
|
|
|
|
|
|
| MEMBERS
|
|
|