Hi lat9,
I've become interested in getting this plugin to remember if I was logged in using Encrypted Master Password, and act accordingly...
Basically what I've done is changed this:
PHP Code:
if (!$password_info->EOF) {
$remember_me_info = array ( 'id' => $_SESSION['customer_id'],
'password' => md5 ($this->secret . $password_info->fields['customers_password']) );
$cookie_value = base64_encode (gzcompress (serialize ($remember_me_info), 9));
setcookie ($this->cookie_name, $cookie_value, time() + $this->cookie_lifetime);
}
to this:
PHP Code:
if (!$password_info->EOF) {
$remember_me_info = array ( 'id' => $_SESSION['customer_id'],
'password' => md5 ($this->secret . $password_info->fields['customers_password']),
'emp' => $_SESSION['emp_admin_login'] );
$cookie_value = base64_encode (gzcompress (serialize ($remember_me_info), 9));
setcookie ($this->cookie_name, $cookie_value, time() + $this->cookie_lifetime);
}
So I've added in this: 'emp' => $_SESSION['emp_admin_login']
into $remember_me_info array...
It seems to be giving me the desired result.
So if I've logged into a customer account with EMP, and the session times out....When the cookie logs me back in it triggers the $_SESSION['emp_admin_login'] flag...
Just wondering if I could be missing anything...
Bookmarks