// change passwd in cookie after changed it

This commit is contained in:
Rémi Gaillard
2013-08-07 13:51:18 +02:00
parent d99a5a740e
commit 6ccf3e839d
2 changed files with 9 additions and 1 deletions
@@ -463,6 +463,14 @@ class AdminEmployeesControllerCore extends AdminController
return parent::initContent();
}
protected function afterUpdate($object)
{
$res = parent::afterUpdate($object);
// Update cookie if needed
if (Tools::getValue('id_employee') == $this->context->employee->id && Tools::getValue('passwd') && $object->passwd != $this->context->employee->passwd)
$this->context->cookie->passwd = $this->context->employee->passwd = $object->passwd;
}
public function ajaxProcessGetTabByIdProfile()
{
$id_profile = Tools::getValue('id_profile');