Make possible to remove first user (Fixes #210)

This commit is contained in:
Fedor A. Fetisov 2017-11-12 17:22:33 +03:00
parent bc39c22c29
commit 3ec1610fff

View File

@ -114,8 +114,6 @@ class ManagementController extends AbstractController
$operator = operator_by_id($operator_id); $operator = operator_by_id($operator_id);
if (!$operator) { if (!$operator) {
throw new NotFoundException('The operator is not found.'); throw new NotFoundException('The operator is not found.');
} elseif ($operator['vclogin'] == 'admin') {
$errors[] = getlocal("Cannot remove operator \"admin\".");
} }
} }
@ -155,8 +153,6 @@ class ManagementController extends AbstractController
$operator = operator_by_id($operator_id); $operator = operator_by_id($operator_id);
if (!$operator) { if (!$operator) {
throw new NotFoundException('The operator is not found.'); throw new NotFoundException('The operator is not found.');
} elseif ($operator['vclogin'] == 'admin') {
$errors[] = getlocal('Cannot disable "admin".');
} }
} }