Verified Commit 700ce126 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(renater-partage) Fix buidling of mail account id from

 cn and email domain for sympa alias lists.

issue #5848
Showing with 5 additions and 1 deletion
+5 -1
...@@ -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(); $cn = $this->parent->getBaseObject()->cn;
if (preg_match('/^(.*)@[^@]+$/', $cn, $m)) {
$cn = $m[1];
}
return $cn.'@'.$this->getEmailDomain();
} else { } else {
/* Calling default behaviour */ /* Calling default behaviour */
return parent::__get($name); return parent::__get($name);
......
Supports Markdown
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