From 0020a5c61c8ed1e6265baee6dc115643d143b2f6 Mon Sep 17 00:00:00 2001 From: javieralapps4up Date: Fri, 22 Oct 2021 02:53:37 +0200 Subject: [PATCH] Update card.php When you edit a user (with read others and change password others), the form allows the civility_code to be changed but the changes are not saved. I will propose a change in the user card to avoid this --- htdocs/user/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8d03d1d1cfb..429de7fd1a6 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2036,7 +2036,11 @@ if ($action == 'create' || $action == 'adduserldap') { // Civility print ''; - print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); + if ($caneditfield && !$object->ldap_sid) { + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); + } elseif ($object->civility_code) { + print $langs->trans("Civility".$object->civility_code); + } print ''; // Lastname