summaryrefslogtreecommitdiffstats
path: root/settings/Mailer
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-07-26 10:48:34 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-07-26 10:48:34 +0200
commit898430b6b10c1430cc9df8b1aecd8c1e5baea555 (patch)
treeb814386684e8bed2d36bb2989d059667a098d01d /settings/Mailer
parentb2341cdfd02b3e8ad90f8ae41320f708c3d54bb6 (diff)
downloadnextcloud-server-898430b6b10c1430cc9df8b1aecd8c1e5baea555.tar.gz
nextcloud-server-898430b6b10c1430cc9df8b1aecd8c1e5baea555.zip
supresses disclosing the userid for LDAP users in the welcome mail
The userid is not relevant here, and by default cannot be used to login with. Typically, there is a common type of login names in organizations (LDAP username or email most often) that does not need to be disclosed. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'settings/Mailer')
-rw-r--r--settings/Mailer/NewUserMailHelper.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/Mailer/NewUserMailHelper.php b/settings/Mailer/NewUserMailHelper.php
index d88f7300f84..fd447c48f01 100644
--- a/settings/Mailer/NewUserMailHelper.php
+++ b/settings/Mailer/NewUserMailHelper.php
@@ -136,7 +136,9 @@ class NewUserMailHelper {
$emailTemplate->addHeading($l10n->t('Welcome aboard %s', [$displayName]));
}
$emailTemplate->addBodyText($l10n->t('Welcome to your %s account, you can add, protect, and share your data.', [$this->themingDefaults->getName()]));
- $emailTemplate->addBodyText($l10n->t('Your username is: %s', [$userId]));
+ if($user->getBackendClassName() !== 'LDAP') {
+ $emailTemplate->addBodyText($l10n->t('Your username is: %s', [$userId]));
+ }
if ($generatePasswordResetToken) {
$leftButtonText = $l10n->t('Set your password');
} else {