Hi lat9!
Yes, exactly. I'm not sure why I thought my little one line of code would actually make this work.
Turns out my testing was completely botched by the fact that I was testing isset on $_SESSION['emp_admin_login'] rather than testing whether $_SESSION['emp_admin_login'] = true...
Wow...anyhow...
Here's what I did to solve the issue:
Below:
PHP Code:
$customers_hashed_password = (isset ($remember_info['password'])) ? $remember_info['password'] : '~~~~';
Put:
PHP Code:
$emp = (isset ($remember_info['emp'])) ? $remember_info['emp'] : false;
Then Below:
PHP Code:
$_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];
Put:
PHP Code:
$_SESSION['emp_admin_login'] = $emp;
Also, as per my previous change, it should remain intact:
After:
PHP Code:
'password' => md5 ($this->secret . $password_info->fields['customers_password'])
Add:
PHP Code:
, 'emp' => $_SESSION['emp_admin_login']
(including the comma for anyone unfamiliar of what's going on there)
So that it looks like:
PHP Code:
'password' => md5 ($this->secret . $password_info->fields['customers_password']), 'emp' => $_SESSION['emp_admin_login'] );
Based on a previous post with a different issue (the shopping cart restore) - we need to test if $_SESSION['emp_admin_login'] isset to avoid php errors...
So I've done this (need advice here):
Below:
PHP Code:
$password_info = $db->Execute ("SELECT customers_password FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "'");
Put:
PHP Code:
if(!isset($_SESSION['emp_admin_login']))
{
$_SESSION['emp_admin_login'] = false;
}
Bookmarks