From 94a5f87bd8447397a6c2a21b33a0a1581a6412cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Feb 2015 15:13:14 +0100 Subject: [PATCH] comment --- htdocs/user/card.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index e8aae1b6af8..bc1b0bea09f 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -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();