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.

DigitalCrate
 
Tony replied on at Permalink Reply
Tony
When sending them to the login page, you can set the page that they are to be redirected to afterwards by setting the rcID variable. This can be a cID or a full urlencoded address. So you'd send people to /login/?rcID=76 or whatever.

You could also probably just do something with the php $_SERVER['HTTP_REFERER'], just testing if the referring page was the login page.
DigitalCrate replied on at Permalink Reply
DigitalCrate
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?
AnotherAndrew replied on at Permalink Reply
AnotherAndrew
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  } ?>
DigitalCrate replied on at Permalink Reply
DigitalCrate
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!!!!