Skip to content
Snippets Groups Projects
Commit 9689707a authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Some admin users have not all features of admin.

parent ea1913d2
Branches
Tags
No related merge requests found
...@@ -172,7 +172,7 @@ if ($_POST["action"] == 'add' && $canadduser) ...@@ -172,7 +172,7 @@ if ($_POST["action"] == 'add' && $canadduser)
$edituser = new User($db); $edituser = new User($db);
if (!empty($conf->file->main_limit_users)) if (!empty($conf->file->main_limit_users)) // If option to limit users is set
{ {
$nb = $edituser->getNbOfUsers(1); $nb = $edituser->getNbOfUsers(1);
if ($nb >= $conf->file->main_limit_users) if ($nb >= $conf->file->main_limit_users)
...@@ -197,7 +197,7 @@ if ($_POST["action"] == 'add' && $canadduser) ...@@ -197,7 +197,7 @@ if ($_POST["action"] == 'add' && $canadduser)
$edituser->phenix_pass = $_POST["phenix_pass"]; $edituser->phenix_pass = $_POST["phenix_pass"];
$edituser->note = $_POST["note"]; $edituser->note = $_POST["note"];
$edituser->ldap_sid = $_POST["ldap_sid"]; $edituser->ldap_sid = $_POST["ldap_sid"];
$edituser->entity = $_POST["entity"]; $edituser->entity = ($_POST["admin"] && empty($conf->multicompany->enabled))?0:$_POST["entity"]; // If multicompany is off, admin users must all be on entity 0.
$db->begin(); $db->begin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment