diff --git a/ChangeLog b/ChangeLog index 0da3052021d..edbab91571f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ $Id$ ***** ChangeLog for 3.1 compared to 3.0 ***** For users: +- New: Status is visible into user list. - New: Support BSB code for bank account in australia. - New: Can set date of payment for autocreate invoice/payment when creating a foundation subscription. diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index fd4e64a68d2..b1ecb65da09 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1591,9 +1591,9 @@ class User extends CommonObject /** - * \brief Retourne le libelle du statut d'un user (actif, inactif) - * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long - * \return string Libelle + * Retourne le libelle du statut d'un user (actif, inactif) + * @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long + * @return string Label of status */ function getLibStatut($mode=0) { @@ -1601,10 +1601,10 @@ class User extends CommonObject } /** - * \brief Renvoi le libelle d'un statut donne - * \param statut Id statut - * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * \return string Libelle du statut + * Renvoi le libelle d'un statut donne + * @param statut Id statut + * @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Label of status */ function LibStatut($statut,$mode=0) { diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 6469d3e6612..4ea15fba781 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -220,7 +220,7 @@ if ($_POST["action"] == 'update') llxHeader('',$langs->trans("GroupCard")); $html = new Form($db); - +$fuserstatic = new User($db); if ($action == 'create') { @@ -377,7 +377,7 @@ else if (!empty($idList)) { - $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin"; + $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin, u.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; $sql.= " AND u.rowid NOT IN (".$idList.")"; @@ -404,7 +404,7 @@ else } else { - $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin"; + $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin, u.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; $sql.= " ORDER BY u.name"; @@ -450,7 +450,7 @@ else /* * Membres du groupe */ - $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin, u.entity"; + $sql = "SELECT u.rowid, u.login, u.name, u.firstname, u.admin, u.entity, u.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql.= " WHERE ug.fk_user = u.rowid"; @@ -468,8 +468,10 @@ else print '
| '.$langs->trans("LastUsersCreated",min($num,$max)).' | ||||
| '.$langs->trans("LastUsersCreated",min($num,$max)).' | '.dol_print_date($db->jdate($obj->datec),'dayhour').' | '; + print ''; + $fuserstatic->id=$obj->id; + $fuserstatic->statut=$obj->statut; + print $fuserstatic->getLibStatut(3); + print ' | '; + print ''; $i++; } @@ -164,13 +172,13 @@ else if ($canreadperms) { $max=5; - + $sql = "SELECT g.rowid, g.nom, g.note, g.entity, g.datec"; $sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql.= " WHERE g.entity IN (0,".$conf->entity.")"; $sql.= $db->order("g.datec","DESC"); $sql.= $db->plimit($max); - + $resql=$db->query($sql); if ($resql) { @@ -179,12 +187,12 @@ if ($canreadperms) print '||
| '.$langs->trans("LastGroupsCreated",($num ? $num : $max)).' | ||||
| '.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.''; if (!$obj->entity) @@ -197,7 +205,7 @@ if ($canreadperms) $i++; } print " | ||||