diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index feb1b6164e0..63db83634a8 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -201,7 +201,11 @@ class User extends CommonObject
$this->user_mobile = $obj->user_mobile;
$this->email = $obj->email;
$this->job = $obj->job;
- $this->signature = $obj->signature;
+ if (!empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) && dol_textishtml(dol_html_entity_decode($obj->signature, ENT_COMPAT | ENT_HTML401))) {
+ $this->signature = dol_html_entity_decode($obj->signature, ENT_COMPAT | ENT_HTML401);
+ }else {
+ $this->signature = $obj->signature;
+ }
$this->admin = $obj->admin;
$this->note = $obj->note;
$this->statut = $obj->statut;
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index 5c4ddac9718..cec4686ba5f 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -886,7 +886,17 @@ if (($action == 'create') || ($action == 'adduserldap'))
// Signature
print '
| '.$langs->trans("Signature").' | ';
print '';
- print '';
+ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ if (!empty($conf->global->FCKEDITOR_ENABLE_USERSIGN)) {
+ $withfckeditor=1;
+ //Mailing is mandatory to have dolHTMLencode done by ckeditor
+ $ckeditortoolbar='dolibarr_mailings';
+ } else {
+ $withfckeditor=0;
+ $ckeditortoolbar='';
+ }
+ $doleditor=new DolEditor('signature',GETPOST('signature'),'',280,$ckeditortoolbar,'In',true,true,$withfckeditor,8,72);
+ print $doleditor->Create(1);
print ' |
';
// Multicompany
@@ -1794,7 +1804,17 @@ else
// Signature
print "".'| '.$langs->trans("Signature").' | ';
print '';
- print '';
+ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+ if (!empty($conf->global->FCKEDITOR_ENABLE_USERSIGN)) {
+ $withfckeditor=1;
+ //Mailing is mandatory to have dolHTMLencode done by ckeditor
+ $ckeditortoolbar='dolibarr_mailings';
+ } else {
+ $withfckeditor=0;
+ $ckeditortoolbar='';
+ }
+ $doleditor=new DolEditor('signature',$object->signature,'',280,$ckeditortoolbar,'In',true,true,$withfckeditor,8,72);
+ print $doleditor->Create(1);
print ' |
';
// openid