From 813c8ed4e9aeeea3fef3b9498d2ba5f6cf0e315e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 31 Jan 2009 00:15:34 +0000 Subject: [PATCH] Fix: Search of user scan also login --- htdocs/user/index.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index aa631de89e7..a184e07a23b 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * * 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 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + /** \file htdocs/user/index.php \brief Page d'accueil de la gestion des utilisateurs @@ -46,6 +46,9 @@ if (! $sortorder) $sortorder="ASC"; $userstatic=new User($db); +/* + * View + */ llxHeader(); @@ -62,7 +65,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid"; $sql.= " WHERE 1=1"; if ($_POST["search_user"]) { - $sql.= " AND (u.name like '%".$_POST["search_user"]."%' OR u.firstname like '%".$_POST["search_user"]."%')"; + $sql.= " AND (u.login like '%".$_POST["search_user"]."%' OR u.name like '%".$_POST["search_user"]."%' OR u.firstname like '%".$_POST["search_user"]."%')"; } if ($sall) $sql.= " AND (u.login like '%".$sall."%' OR u.name like '%".$sall."%' OR u.firstname like '%".$sall."%' OR u.email like '%".$sall."%' OR u.note like '%".$sall."%')"; if ($sortfield) $sql.=" ORDER BY $sortfield $sortorder"; @@ -94,7 +97,7 @@ if ($result) print ""; print ''.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.''; - if ($obj->admin) + if ($obj->admin) { print img_picto($langs->trans("Administrator"),'star'); } @@ -112,7 +115,7 @@ if ($result) } else print $langs->trans("InternalUser"); print ''; - + // Date creation print ''.dolibarr_print_date($obj->datec,"day").'';