git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@6062 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-04-25 12:07:31 +00:00
parent 66494a5a83
commit 6e34cc3f77
4 changed files with 7 additions and 14 deletions
+1 -8
View File
@@ -179,7 +179,7 @@ class AdminEmployees extends AdminTab
{
global $cookie;
if (Tools::isSubmit('deleteemployee') OR Tools::isSubmit('status'))
if (Tools::isSubmit('deleteemployee') OR Tools::isSubmit('status') OR Tools::isSubmit('statusemployee'))
{
if ($cookie->id_employee == Tools::getValue('id_employee'))
{
@@ -193,16 +193,9 @@ class AdminEmployees extends AdminTab
$this->_errors[] = Tools::displayError('You cannot disable or delete the last administrator account.');
return false;
}
}
elseif (Tools::isSubmit('submitAddemployee'))
{
if ($cookie->id_employee == Tools::getValue('id_employee') && Tools::getvalue('active') == 0)
{
$this->_errors[] = Tools::displayError('You cannot disable or delete the last administrator account.');
return false;
}
$employee = new Employee(Tools::getValue('id_employee'));
if (!(int)$this->tabAccess['edit'])
$_POST['id_profile'] = $_GET['id_profile'] = $employee->id_profile;