Merge pull request #7799 from hregis/develop_ldap

Fix: Avoid ldap error
This commit is contained in:
Laurent Destailleur 2017-11-11 18:00:21 +01:00 committed by GitHub
commit a4632ea2c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1969,7 +1969,7 @@ class Adherent extends CommonObject
$this->fullname=$this->getFullName($langs);
// For avoid ldap error when firstname and lastname are empty
if ($this->morphy == 'mor' && empty($this->fullname)) {
if ($this->morphy == 'mor' && (empty($this->fullname) || $this->fullname == $this->societe)) {
$this->fullname = $this->societe;
$this->lastname = $this->societe;
}