Email translations

This commit is contained in:
vjrj 2018-01-22 13:27:46 +01:00
parent 952431d296
commit 6c8fa91f64
30 changed files with 1844 additions and 107 deletions

View file

@ -3,7 +3,15 @@ import sendWelcomeEmail from '../../../api/Users/server/send-welcome-email';
Accounts.onCreateUser((options, user) => {
const userToCreate = user;
if (options.profile) userToCreate.profile = options.profile;
sendWelcomeEmail(options, user);
console.log(JSON.stringify(user));
console.log(JSON.stringify(options));
if (options.profile) {
userToCreate.profile = options.profile;
userToCreate.lang = options.profile.lang;
delete options.profile.lang;
} else {
// TODO others (google, etc) ?
}
sendWelcomeEmail(options, userToCreate);
return userToCreate;
});