Login Redirection
Permalink
Hi
I have a sitehttp://www.hailshamrotary.org.uk
Ok, now, the nav at the top expands upon entering members log in details into the login block added to the home page to display additional navigation just for the members. The problem i have is that the members say that it is not obvious enough for them that they have successfully logged in! So, what i would like to know is this.... If I have used the log in block, can i change the page so that upon logging in, they are redirected to my chosen page, for example a page named "congratulations" whereby I can inform them that they have indeed signed in successfully??????
Any help would be great cos i just cant get my head round this at all!!!!!!
Many thanks in advance.
I have a sitehttp://www.hailshamrotary.org.uk
Ok, now, the nav at the top expands upon entering members log in details into the login block added to the home page to display additional navigation just for the members. The problem i have is that the members say that it is not obvious enough for them that they have successfully logged in! So, what i would like to know is this.... If I have used the log in block, can i change the page so that upon logging in, they are redirected to my chosen page, for example a page named "congratulations" whereby I can inform them that they have indeed signed in successfully??????
Any help would be great cos i just cant get my head round this at all!!!!!!
Many thanks in advance.
Hi Tony
Thanks for taking the time to respond, however, I'm uncertain of how to do what you are telling me....
When I add the "LogIn" block to my page, the only things I can specify when editing this block is "Show register Link" and "Return visitor to this page after logging in", just those two options. How or where can i find the code that need to be altered to direct them to a "Successful Login" page of my choice? Is this something that is available in 5.3.1?
Thanks for taking the time to respond, however, I'm uncertain of how to do what you are telling me....
When I add the "LogIn" block to my page, the only things I can specify when editing this block is "Show register Link" and "Return visitor to this page after logging in", just those two options. How or where can i find the code that need to be altered to direct them to a "Successful Login" page of my choice? Is this something that is available in 5.3.1?
In the login block's view.php, try this just after the beginning form tag:
<?php if($returnToSamePage ){ ?> <input type="hidden" name="rcID" id="rcID" value="<?php echo View::url('/ENTER_URL_OF_PAGE_TO_REDIRECT_USER')?>" style="display: none;"/> <?php } ?>
Hi Andrew
Thanks for that, I altered the code to
<form class="login_block_form" method="post" action="<?=$loginURL?>">
<? if($returnToSamePage ){ ?>
<input type="hidden" name="rcID" id="rcID" value="<?php echo View::url('/index.php/redirected_page.php')?>" />
<? } ?>
which works perfectly. Once you pointed it out it made perfect sense, once again, thanks very much for taking the time to help me out.
Concrete5 forums and its members rock!!!!
Thanks for that, I altered the code to
<form class="login_block_form" method="post" action="<?=$loginURL?>">
<? if($returnToSamePage ){ ?>
<input type="hidden" name="rcID" id="rcID" value="<?php echo View::url('/index.php/redirected_page.php')?>" />
<? } ?>
which works perfectly. Once you pointed it out it made perfect sense, once again, thanks very much for taking the time to help me out.
Concrete5 forums and its members rock!!!!
You could also probably just do something with the php $_SERVER['HTTP_REFERER'], just testing if the referring page was the login page.