From 047785b273a06a996aa6febf79fccd3b672563af Mon Sep 17 00:00:00 2001 From: atm-lena Date: Fri, 6 Nov 2020 11:58:36 +0100 Subject: [PATCH] FIX - Don't display inactive users in birthday box and soc card --- htdocs/core/boxes/box_birthdays.php | 3 ++- htdocs/societe/card.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_birthdays.php b/htdocs/core/boxes/box_birthdays.php index 2df1f0d331e..4f7eb6890b4 100644 --- a/htdocs/core/boxes/box_birthdays.php +++ b/htdocs/core/boxes/box_birthdays.php @@ -89,7 +89,8 @@ class box_birthdays extends ModeleBoxes $sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (".getEntity('user').")"; - $sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0); + $sql.= " AND u.statut = 1"; + $sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0); $sql.= " ORDER BY u.birth ASC"; $sql.= $this->db->plimit($max, 0); diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index ee252677bf2..f6abc142054 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1570,7 +1570,7 @@ else print ''; print ''.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).''; print ''; - $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); + $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1); // Note: If user has no right to "see all thirdparties", we force selection of sale representative to him, so after creation he can see the record. $selected = (count(GETPOST('commercial', 'array')) > 0 ? GETPOST('commercial', 'array') : (GETPOST('commercial', 'int') > 0 ? array(GETPOST('commercial', 'int')) : (empty($user->rights->societe->client->voir) ? array($user->id) : array()))); print $form->multiselectarray('commercial', $userlist, $selected, null, null, null, null, "90%");