diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-01-07 13:30:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 13:30:11 +0100 |
commit | 450211590f51e8876f42c377fa111256e671a9dc (patch) | |
tree | a37ecd2165caf6270bc29d1cbd8513d1a2b3449c /apps | |
parent | 15e8f8b817d1bbb2444978288a7af007056f0e08 (diff) | |
parent | abfb72378fd7d7755fa8441dfb5aad7a336ed4fc (diff) | |
download | nextcloud-server-450211590f51e8876f42c377fa111256e671a9dc.tar.gz nextcloud-server-450211590f51e8876f42c377fa111256e671a9dc.zip |
Merge pull request #25000 from nextcloud/bugfix/noid/hide-client-welcome-mail
Hide client link in welcome mail if an empty customclient_desktop config is set
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/Mailer/NewUserMailHelper.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/apps/settings/lib/Mailer/NewUserMailHelper.php b/apps/settings/lib/Mailer/NewUserMailHelper.php index 4b4428e1221..5caa441a245 100644 --- a/apps/settings/lib/Mailer/NewUserMailHelper.php +++ b/apps/settings/lib/Mailer/NewUserMailHelper.php @@ -143,12 +143,22 @@ class NewUserMailHelper { } else { $leftButtonText = $l10n->t('Go to %s', [$this->themingDefaults->getName()]); } - $emailTemplate->addBodyButtonGroup( - $leftButtonText, - $link, - $l10n->t('Install Client'), - $this->config->getSystemValue('customclient_desktop', 'https://nextcloud.com/install/#install-clients') - ); + + $clientDownload = $this->config->getSystemValue('customclient_desktop', 'https://nextcloud.com/install/#install-clients'); + if ($clientDownload === '') { + $emailTemplate->addBodyButton( + $leftButtonText, + $link + ); + } else { + $emailTemplate->addBodyButtonGroup( + $leftButtonText, + $link, + $l10n->t('Install Client'), + $clientDownload + ); + } + $emailTemplate->addFooter(); return $emailTemplate; |