diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 2dff996b236..5849c353d55 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -1,6 +1,7 @@ - * Copyright (C) 2010 Laurent Destailleur +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2010 Laurent Destailleur + * Copyright (C) 2010-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -193,8 +194,9 @@ if ($_GET["socid"]) $title=$langs->trans("ListOfUsers"); $sql = "SELECT u.rowid, u.name, u.firstname, u.login"; - $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql .= " ORDER BY u.name ASC "; + $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; + $sql.= " ORDER BY u.name ASC "; $resql = $db->query($sql); if ($resql)