This commit is contained in:
Laurent Destailleur 2015-02-23 15:13:14 +01:00
parent 6d3834b3b9
commit 94a5f87bd8

View File

@ -212,7 +212,7 @@ if ($action == 'add' && $canadduser)
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
// If multicompany is off, admin users must all be on entity 0.
// Set entity of new user
$entity=GETPOST('entity','int');
if (! empty($conf->multicompany->enabled))
{
@ -230,8 +230,11 @@ if ($action == 'add' && $canadduser)
}
}
else
{
{
$object->entity = ($entity == '' ? 1 : $entity);
/*if ($user->admin && $user->entity == 0 && GETPOST("admin",'alpha'))
{
}*/
}
$db->begin();