Commit 02874c86 authored by Côme Chilliet's avatar Côme Chilliet

🚑 fix(partage) Only append domain mail if sympa cn does not contain one

issue #5807
parent b8e5836d
......@@ -92,7 +92,11 @@ class sympaAliasPartage extends simplePlugin
if (($name == 'cn') && isset($this->parent)) {
return $this->parent->getBaseObject()->$name;
} 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 {
/* Calling default behaviour */
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