Merge pull request 'Don't send welcome email if email service is not enabled' (#6) from WelcomeEmail-patch into develop

Reviewed-on: https://git.digitaltelepresence.com/digital-telepresence/dtp-sites/pulls/6
master
CyberShell 2 years ago
commit 266bd0b5ac

@ -127,7 +127,12 @@ class UserService extends SiteService {
}
async sendWelcomeEmail (user) {
if (process.env.DTP_EMAIL_SERVICE !== 'enabled') {
this.log.info("Welcome email will not be sent: DTP_EMAIL_SERVICE is disabled, the system can't send email and will not try.");
return;
}
const { email: emailService } = this.dtp.services;
/*
* Remove all pending EmailVerify tokens for the User.

Loading…
Cancel
Save