11971 - add id_employee in parameters backup

This commit is contained in:
Rodney Figaro 2017-03-15 18:08:08 +01:00
parent 2f7bd648a4
commit 26df073ef8

View File

@ -96,15 +96,20 @@ class AdminMarketing extends ModuleAdminController
public function saveUserParameters(array $parameters)
{
// choose md5 name because of 32 characters limitation
Configuration::updateValue(md5(get_class($this)), serialize($parameters));
Configuration::updateValue($this->getConfigParamName(), serialize($parameters));
}
public function loadUserParameters()
{
$params = Configuration::get(md5(get_class($this)));
$params = Configuration::get($this->getConfigParamName());
if ($params === false) {
return array();
}
return unserialize($params);
}
private function getConfigParamName()
{
return md5($this->context->cookie->id_employee.'-'.get_class($this));
}
}