From 822aebeae589833bd45bcc713de1f270e59fe22d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 25 Jan 2023 10:48:28 +0100 Subject: [PATCH] Use the default primary color instead of "randomly" the color of the user triggering the email Signed-off-by: Joas Schilling --- lib/private/Mail/EMailTemplate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 7ec2b46bad31b..40738623c192f 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -380,7 +380,7 @@ public function addHeader() { $this->headerAdded = true; $logoUrl = $this->urlGenerator->getAbsoluteURL($this->themingDefaults->getLogo(false)); - $this->htmlBody .= vsprintf($this->header, [$this->themingDefaults->getColorPrimary(), $logoUrl, $this->themingDefaults->getName()]); + $this->htmlBody .= vsprintf($this->header, [$this->themingDefaults->getDefaultColorPrimary(), $logoUrl, $this->themingDefaults->getName()]); } /** @@ -555,7 +555,7 @@ public function addBodyButtonGroup(string $textLeft, $this->ensureBodyIsOpened(); $this->ensureBodyListClosed(); - $color = $this->themingDefaults->getColorPrimary(); + $color = $this->themingDefaults->getDefaultColorPrimary(); $textColor = $this->themingDefaults->getTextColorPrimary(); $this->htmlBody .= vsprintf($this->buttonGroup, [$color, $color, $urlLeft, $color, $textColor, $textColor, $textLeft, $urlRight, $textRight]); @@ -586,7 +586,7 @@ public function addBodyButton(string $text, string $url, $plainText = '') { $text = htmlspecialchars($text); } - $color = $this->themingDefaults->getColorPrimary(); + $color = $this->themingDefaults->getDefaultColorPrimary(); $textColor = $this->themingDefaults->getTextColorPrimary(); $this->htmlBody .= vsprintf($this->button, [$color, $color, $url, $color, $textColor, $textColor, $text]);