'."\n";
$i++;
}
diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang
index d6ffb849aa8..996ba20ab7d 100644
--- a/htdocs/langs/en_US/users.lang
+++ b/htdocs/langs/en_US/users.lang
@@ -75,6 +75,7 @@ CreateInternalUserDesc=This form allows you to create an internal user in your c
InternalExternalDesc=An internal user is a user that is part of your company/organization. An external user is a customer, vendor or other (Creating an external user for a third-party can be done from the contact record of the third-party).
In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display)
PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group.
Inherited=Inherited
+UserWillBe=Created user will be
UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party)
UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party)
IdPhoneCaller=Id phone caller
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index e2c4b605dcc..9ecd00ca36f 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -375,7 +375,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
if ($_SERVER['REQUEST_METHOD'] == 'POST' ||
((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) ||
- in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment')))
+ in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty')))
{
if (!GETPOSTISSET('token')) {
if (GETPOST('uploadform', 'int')) {
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index ac1aa5b8f98..fee36c3ff1b 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2358,11 +2358,12 @@ class Societe extends CommonObject
$code .= $this->code_fournisseur.' - ';
}
- if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1)
- {
- $name = $code.' '.$name;
- } else {
- $name = $code;
+ if ($code) {
+ if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1) {
+ $name = $code.' '.$name;
+ } else {
+ $name = $code;
+ }
}
}
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index c82eafb353a..1649032fc8d 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -1318,7 +1318,8 @@ class User extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Create a user into database from a member object
+ * Create a user into database from a member object.
+ * If $member->fk_soc is set, it will be an external user.
*
* @param Adherent $member Object member source
* @param string $login Login to force