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
This commit is contained in:
Roeland Jago Douma 2021-01-07 13:30:11 +01:00 committed by GitHub
commit 450211590f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 6 deletions

View File

@ -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;