From 98c2ba8c617f22b9cb53ff63b3c4306f5f91bc53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Mar 2016 15:41:46 +0200 Subject: [PATCH] Normalize code --- htdocs/societe/commerciaux.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index b87bad6099d..4bf8616e721 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -227,7 +227,7 @@ if (! empty($socid)) $langs->load("users"); $title=$langs->trans("ListOfUsers"); - $sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.login, u.statut"; + $sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.login, u.email, u.statut, u.fk_soc"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) { @@ -259,17 +259,21 @@ if (! empty($socid)) print "\n"; $var=True; - + $tmpuser=new User($db); + while ($i < $num) { $obj = $db->fetch_object($resql); $var=!$var; print ""; - print ''; - print img_object($langs->trans("ShowUser"),"user").' '; - print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n"; - print ''; - + $tmpuser->id=$obj->rowid; + $tmpuser->firstname=$obj->firstname; + $tmpuser->lastname=$obj->lastname; + $tmpuser->statut=$obj->statut; + $tmpuser->login=$obj->login; + $tmpuser->email=$obj->email; + $tmpuser->societe_id=$obj->fk_soc; + print $tmpuser->getNomUrl(1); print ''; print ''.$obj->login.''; print ''.User::LibStatut($obj->statut,0).'';