More work in email translations
This commit is contained in:
parent
af042b8722
commit
c67609b417
9 changed files with 37 additions and 20 deletions
|
|
@ -3,15 +3,17 @@ import sendWelcomeEmail from '../../../api/Users/server/send-welcome-email';
|
|||
|
||||
Accounts.onCreateUser((options, user) => {
|
||||
const userToCreate = user;
|
||||
console.log(JSON.stringify(user));
|
||||
console.log(JSON.stringify(options));
|
||||
// console.log(JSON.stringify(user));
|
||||
// console.log(JSON.stringify(options));
|
||||
let lang = 'en'; // fallback
|
||||
if (options.profile) {
|
||||
userToCreate.profile = options.profile;
|
||||
userToCreate.lang = options.profile.lang;
|
||||
lang = options.profile.lang;
|
||||
delete options.profile.lang;
|
||||
} else {
|
||||
// TODO others (google, etc) ?
|
||||
}
|
||||
sendWelcomeEmail(options, userToCreate);
|
||||
sendWelcomeEmail(options, userToCreate, lang);
|
||||
return userToCreate;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue