// replace id_profile 1 to _PS_ADMIN_PROFILE_
This commit is contained in:
1 parent
2672149e34
commit
ab7d4f6eb4
1 file changed
+2
-2
@@ -51,10 +51,10 @@ class AdminEmployeesControllerCore extends AdminController
|
|||||||
check if there are more than one superAdmin
|
check if there are more than one superAdmin
|
||||||
if it's the case then we can delete a superAdmin
|
if it's the case then we can delete a superAdmin
|
||||||
*/
|
*/
|
||||||
$super_admin = Employee::countProfile(1, true);
|
$super_admin = Employee::countProfile(_PS_ADMIN_PROFILE_, true);
|
||||||
if ($super_admin == 1)
|
if ($super_admin == 1)
|
||||||
{
|
{
|
||||||
$super_admin_array = Employee::getEmployeesByProfile(1, true);
|
$super_admin_array = Employee::getEmployeesByProfile(_PS_ADMIN_PROFILE_, true);
|
||||||
$super_admin_id = array();
|
$super_admin_id = array();
|
||||||
foreach ($super_admin_array as $key => $val)
|
foreach ($super_admin_array as $key => $val)
|
||||||
$super_admin_id[] = $val['id_employee'];
|
$super_admin_id[] = $val['id_employee'];
|
||||||
|
|||||||
Reference in new issue
Block a user