diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-01-05 11:01:38 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-01-07 10:45:54 +0100 |
commit | abfb72378fd7d7755fa8441dfb5aad7a336ed4fc (patch) | |
tree | ca10a95f9b63e0dcbe7c8a97073dcc462dcc7ed5 /apps/settings/lib/Mailer | |
parent | 27e43d810f64f3b181a03dc1818ca6678ee6b306 (diff) | |
download | nextcloud-server-abfb72378fd7d7755fa8441dfb5aad7a336ed4fc.tar.gz nextcloud-server-abfb72378fd7d7755fa8441dfb5aad7a336ed4fc.zip |
Hide client link in welcome mail if an empty customclient_desktop config is set
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/settings/lib/Mailer')
-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; |