diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index d3c1c40e877..6a78003324d 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -350,7 +350,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$message.='
'.$langs->trans("ErrorLoginAlreadyExists",$edituser->login).'
';
}
else
- {
+ {
$message.=''.$edituser->error.'
';
}
}
@@ -462,6 +462,7 @@ if ($action == 'adduserldap')
$selecteduser = $_POST['users'];
$required_fields = array(
+ $conf->global->LDAP_KEY_USERS,
$conf->global->LDAP_FIELD_NAME,
$conf->global->LDAP_FIELD_FIRSTNAME,
$conf->global->LDAP_FIELD_LOGIN,
@@ -532,7 +533,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
print "
";
print "
";
- dol_htmloutput_errors($message);
+ dol_htmloutput_mesg($message);
if (! empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr'))
{
@@ -557,6 +558,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
// Get from LDAP database an array of results
$ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 1);
+
if (is_array($ldapusers))
{
$liste=array();
@@ -586,27 +588,27 @@ if (($action == 'create') || ($action == 'adduserldap'))
}
// Si la liste des users est rempli, on affiche la liste deroulante
- if (is_array($liste))
+ print "\n\n\n";
+
+ print '';
+
+ print "\n\n\n";
+ print '
';
}
print '