Commit a6d1cf7e authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5807-domain-mail-add-twice-when-edit-the-renater-partage-parameters' into '1.3-dev'

Resolve "domain mail add twice when edit the RENATER partage parameters"

See merge request fusiondirectory/fd-plugins!212
parents b8e5836d 02874c86
...@@ -92,7 +92,11 @@ class sympaAliasPartage extends simplePlugin ...@@ -92,7 +92,11 @@ class sympaAliasPartage extends simplePlugin
if (($name == 'cn') && isset($this->parent)) { if (($name == 'cn') && isset($this->parent)) {
return $this->parent->getBaseObject()->$name; return $this->parent->getBaseObject()->$name;
} elseif (($name == 'mail') && isset($this->parent)) { } elseif (($name == 'mail') && isset($this->parent)) {
return $this->parent->getBaseObject()->cn.'@'.$this->getEmailDomain(); $mail = $this->parent->getBaseObject()->cn;
if (strpos($mail, '@') === FALSE) {
$mail .= '@'.$this->getEmailDomain();
}
return $mail;
} else { } else {
/* Calling default behaviour */ /* Calling default behaviour */
return parent::__get($name); return parent::__get($name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment