overleaf/server-ce/hotfix/2.6.2/onboarding-email.patch

26 lines
796 B
Diff
Raw Permalink Normal View History

2021-05-20 04:59:43 -04:00
--- /var/www/sharelatex/web/app/src/Features/User/UserCreator.js
+++ /var/www/sharelatex/web/app/src/Features/User/UserCreator.js
@@ -85,13 +85,15 @@ async function createNewUser(attributes, options = {}) {
}
Analytics.recordEvent(user._id, 'user-registered')
- try {
- await UserOnboardingEmailQueueManager.scheduleOnboardingEmail(user)
- } catch (error) {
- logger.error(
- `Failed to schedule sending of onboarding email for user '${user._id}'`,
- error
- )
+ if(Features.hasFeature('saas')) {
+ try {
+ await UserOnboardingEmailQueueManager.scheduleOnboardingEmail(user)
+ } catch (error) {
+ logger.error(
+ `Failed to schedule sending of onboarding email for user '${user._id}'`,
+ error
+ )
+ }
}
return user