diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index a1675771bee..d545391bd4f 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1993,6 +1993,8 @@ else
if ($canreadgroup)
{
+ print ''."\n";
+
print load_fiche_titre($langs->trans("ListOfGroupsForUser"), '', '');
// On selectionne les groupes auquel fait parti le user
@@ -2031,13 +2033,11 @@ else
print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity);
print ' ';
print '';
- print '';
+ print '';
}
print ''."\n";
- /*
- * Groups assigned to user
- */
+ // List of groups of user
if (!empty($groupslist))
{
foreach ($groupslist as $group)
@@ -2085,7 +2085,7 @@ else
}
/*
- * Fiche en mode edition
+ * Card in edit mode
*/
if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id)))
{
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index aaa631fdf36..c897db44412 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -160,6 +160,8 @@ class UserGroup extends CommonObject
$result = $this->fetchCommon($id);
}
+ $this->name = $this->nom; // For compatibility with field name
+
if($result)
{
if ($load_members)