From bdd447f0f733f6c5be5e2d9f3ced0909c21916fb Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Thu, 22 Dec 2011 22:20:24 +0000 Subject: [PATCH] // yet another adminEmployeeController fix git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11712 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminEmployeesController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php index fe4c78174..8f63605cd 100644 --- a/controllers/admin/AdminEmployeesController.php +++ b/controllers/admin/AdminEmployeesController.php @@ -113,9 +113,10 @@ class AdminEmployeesControllerCore extends AdminController $available_profiles = Profile::getProfiles($this->context->language->id); if ($obj->id_profile == _PS_ADMIN_PROFILE_ && $this->context->employee->id_profile != _PS_ADMIN_PROFILE_) + { $this->_errors[] = Tools::displayError('You cannot edit SuperAdmin profile.'); - - return parent::renderForm(); + return parent::renderForm(); + } $path = _PS_ADMIN_DIR_.'/themes/'; @@ -238,7 +239,7 @@ class AdminEmployeesControllerCore extends AdminController // if employee is not SuperAdmin (id_profile = 1), don't make it possible to select the admin profile if ($this->context->employee->id_profile != _PS_ADMIN_PROFILE_) foreach ($available_profiles as $i => $profile) - if ($available_profile['id_profile'] == _PS_ADMIN_PROFILE_) + if ($available_profiles[$i]['id_profile'] == _PS_ADMIN_PROFILE_) { unset($available_profiles[$i]); break;