From eec1fefaa5eec08190b5db59011a8079638054b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 May 2021 14:25:54 +0200 Subject: [PATCH] Update list.php --- htdocs/user/list.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 6e78a1a7903..b6e5cba5652 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -571,7 +571,7 @@ print ''; $url = DOL_URL_ROOT.'/user/card.php?action=create'.($mode == 'employee' ? '&employee=1' : '').'&leftmenu='; if (!empty($socid)) { - $url .= '&socid='.$socid; + $url .= '&socid='.urlencode($socid); } $newcardbutton = dolGetButtonTitle($langs->trans('NewUser'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); @@ -942,9 +942,8 @@ while ($i < ($limit ? min($num, $limit) : $num)) { $totalarray['nbfield']++; } } - if (empty($obj->socid)) $obj->socid = 0; if (!empty($arrayfields['u.email']['checked'])) { - print ''.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 0, 0, 1)."\n"; + print ''.dol_print_email($obj->email, $obj->rowid, $obj->fk_soc, 'AC_EMAIL', 0, 0, 1)."\n"; if (!$i) { $totalarray['nbfield']++; }