Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
JD
JD
Hi
 
Does anyone have an idea of how to change the redirect page after a user logs in.
 
At the moment when a user logs in they are automatically redirected to the user profile page. I want the user to be returned to the page they were viewing prior to logging in - eg home page, or product page, etc.
 
So it would need to be dynamic.
 
Thanks
 
Chuck
Chuck
Hi JD,
 
Sounds like an interesting feature that could be useful. I'd recommend you send your request directly to the ViArt support team. Create a ticket and keep the forum updated.
 
Excited to hear what you find out~
 
dmOZ
dmOZ
you could do something in PHP using $_SERVER['HTTP_REFERER']
 
look at block_login_advanced.php
 
[line 59] $return_page = get_param("return_page");
 
and you may be able to build your logic around that.
 
 
but also look at lines 11-15 of Block_user_home.php which is called from user_home.php?operation=logout
 
----- code ----
 
if ($operation == "logout") {
user_logout();
 
header("Location: " . get_custom_friendly_url("index.php"));
exit;
}
 
JD
JD
Thanks for the replies, it seems that the login does automatically redirect back to the page when using the login block already. But if the user needs to update their contact information it displays that page until this info is updated.
 
dmOZ
dmOZ