I've been looking into why I'm always redirected to my website's home page after I login. On most ecommerce websites I expect to be directed back to the previous page.
Can someone please explain what the following code in includes/modules/pages/login/header_php.php does?
Code:
if (sizeof($_SESSION['navigation']->snapshot) > 0) {
// $back = sizeof($_SESSION['navigation']->path)-2;
//if (isset($_SESSION['navigation']->path[$back]['page'])) {
// if (sizeof($_SESSION['navigation']->path)-2 > 0) {
$origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
// $origin_href = zen_back_link_only(true);
$_SESSION['navigation']->clear_snapshot();
zen_redirect($origin_href);
} else {
zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));
}
To me, it looks like it sends the visitor to their last page (before logging in). However, I always end up on the home page.
Is this code broken?
All the best,
Alex
Bookmarks