Quote:
Originally Posted by chamberinternet
Mind you, does anyone how to redirect the user to the homepage after logging in with thundernugs modification rather taking them to a page with options to modify their account?
Thanks
Shafiq :sK
|
Not sure how it works in 4.1.x but in 4.0.12 I use the following:
in include/login.php (around line 200) you will find this piece of code
Code:
if ($login_type == "C" || $login_type == "B") {
if($redirect2 == "checkout") {
func_header_location($redirect_to."/cart.php?mode=checkout");
} elseif (!func_is_cart_empty($cart)) {
if((strpos($HTTP_REFERER, "mode=auth") === false) && (strpos($HTTP_REFERER, "mode=checkout") === false)) {
func_header_location($redirect_to."/cart.php");
} else {
func_header_location($redirect_to."/cart.php?mode=checkout");
}
} elseif (!empty($HTTP_REFERER)) {
if((strncasecmp($HTTP_REFERER,$http_location,strlen($http_location))==0 || strncasecmp($HTTP_REFERER,$https_location,strlen($https_location))==0) &&
strpos($HTTP_REFERER,"error_message.php")===false &&
strpos($HTTP_REFERER,'secure_login.php')===false &&
strpos($HTTP_REFERER,".php")!==false) {
func_header_location($redirect_to."/pages.php?pageid=2");
}
}
func_header_location($redirect_to."/pages.php?pageid=2");
The code in red is the page where my customers are redirected too after a succesfull login.
I'm using a static page, but you can change that into any page, like for example home.php.
Hope this helps - good luck!