Fix: Some admin users have not all features of admin.
This commit is contained in:
parent
ea1913d2e6
commit
9689707a92
@ -172,7 +172,7 @@ if ($_POST["action"] == 'add' && $canadduser)
|
||||
|
||||
$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);
|
||||
if ($nb >= $conf->file->main_limit_users)
|
||||
@ -197,7 +197,7 @@ if ($_POST["action"] == 'add' && $canadduser)
|
||||
$edituser->phenix_pass = $_POST["phenix_pass"];
|
||||
$edituser->note = $_POST["note"];
|
||||
$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();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user