diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 2c2390a9005..0ca6f57f458 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -515,7 +515,9 @@ class vCard $this->setOrg($company->name); } - $this->setURL($company->url, ""); + if (!empty($company->url)) { + $this->setURL($company->url, ""); + } if ($company->phone && empty($object->office_phone)) { // If we already set the type TYPE=WORK,VOICE with office_phone $this->setPhoneNumber($company->phone, "TYPE=WORK,VOICE"); diff --git a/htdocs/public/users/view.php b/htdocs/public/users/view.php index deec8d448ed..e87dcdbd08e 100644 --- a/htdocs/public/users/view.php +++ b/htdocs/public/users/view.php @@ -184,6 +184,18 @@ if (!getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object)) { if (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { $company = null; } +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_EMAIL', 0, $object)) { + $mysoc->email = ''; +} +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) { + $mysoc->phone = ''; +} +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) { + $mysoc->fax = ''; +} +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_URL', 0, $object)) { + $mysoc->url = ''; +} if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) && is_object($company)) { $company->socialnetworks = []; } else { diff --git a/htdocs/user/virtualcard.php b/htdocs/user/virtualcard.php index 5266f973bd8..d6262bcbe3e 100644 --- a/htdocs/user/virtualcard.php +++ b/htdocs/user/virtualcard.php @@ -303,6 +303,34 @@ if (getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) { print "\n"; if (!getDolUserString('USER_PUBLIC_HIDE_COMPANY', '', $object)) { + // Email + print '