01-20-2017, 06:37 PM
No problem.
So there are two ways to handle this...
In PHP, I would think you could do...
Then you might have to do some escaping and then pass that as a $_GET variable to the login page.
So something like
Then when you are processing login do
Then pass that off to the custom login script and
But I think I wrote a javascript snippet that I think works better. Here's how it works.
Replace your usersc/scripts/custom_login_script.php with the text of this file...
https://hastebin.com/apivosuwit.xml
When you are logged in, the userspice calls the login script.
The login script has a function that will essentially hit the back button twice in your browser.
Then it just automatically invokes the function.
So there are two ways to handle this...
In PHP, I would think you could do...
Code:
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
Then you might have to do some escaping and then pass that as a $_GET variable to the login page.
So something like
Code:
Redirect::to('login.php?FROM='.$actual_link);
Then when you are processing login do
Code:
$from = Input::get('FROM');
Then pass that off to the custom login script and
Code:
if(!empty($from)){
Code:
Redirect::to($from);
Code:
}
But I think I wrote a javascript snippet that I think works better. Here's how it works.
Replace your usersc/scripts/custom_login_script.php with the text of this file...
https://hastebin.com/apivosuwit.xml
When you are logged in, the userspice calls the login script.
The login script has a function that will essentially hit the back button twice in your browser.
Then it just automatically invokes the function.