I realize I'm digging up an old thread, but it is obviously still relevant as I ran into the same issue with a fresh install. Previously I had my own contrib called SessionWatcher which did a couple of things, one of which was ensuring a user went back to the page they came from after logging in (something that just seems obvious to me from a UX point of view). I only recently upgraded to 1.5.4 and see that SessionWatcher doesn't work (no surprise). I set about updating it but then I realized this is a much easier way of achieving the same thing.
So... does anyone see any reason why we can't add something like this:
Code:
if (!$_SESSION['customer_id']) {
if (($_GET['main_page'] != FILENAME_LOGIN) && ($_GET['main_page'] != FILENAME_LOGOFF) && ($_GET['main_page'] != FILENAME_TIME_OUT) && ($_GET['main_page'] != FILENAME_CREATE_ACCOUNT_SUCCESS) && ($_GET['main_page'] != FILENAME_CREATE_ACCOUNT)) {
$_SESSION['navigation']->set_snapshot();
}
}
near the top of /includes/templates/MY_TEMPLATE/common/html_header.php?
It could be the very first line of PHP in that file, say directly above where you find:
Code:
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
I don't immediately see a problem and it certainly seems to work in my initial testing. But I'm open to suggestions. It probably shouldn't be done in a template file, but that seemed the easiest thing to do without monkeying around with files that are going to be destroyed in an update.
Bookmarks