mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 05:57:13 -04:00
Merge branch 'fmonthel-devel' into devel
Invite user with lower case email
This commit is contained in:
commit
d61e609977
2 changed files with 4 additions and 3 deletions
|
@ -349,7 +349,8 @@ if (Meteor.isServer) {
|
|||
} else {
|
||||
if (posAt <= 0) throw new Meteor.Error('error-user-doesNotExist');
|
||||
|
||||
const email = username;
|
||||
// Set in lowercase email before creating account
|
||||
const email = username.toLowerCase();
|
||||
username = email.substring(0, posAt);
|
||||
const newUserId = Accounts.createUser({ username, email });
|
||||
if (!newUserId) throw new Meteor.Error('error-user-notCreated');
|
||||
|
@ -377,7 +378,7 @@ if (Meteor.isServer) {
|
|||
};
|
||||
const lang = user.getLanguage();
|
||||
Email.send({
|
||||
to: user.emails[0].address,
|
||||
to: user.emails[0].address.toLowerCase(),
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject: TAPi18n.__('email-invite-subject', params, lang),
|
||||
text: TAPi18n.__('email-invite-text', params, lang),
|
||||
|
|
|
@ -28,7 +28,7 @@ Meteor.startup(() => {
|
|||
|
||||
try {
|
||||
Email.send({
|
||||
to: user.emails[0].address,
|
||||
to: user.emails[0].address.toLowerCase(),
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject: TAPi18n.__('act-activity-notify', {}, user.getLanguage()),
|
||||
text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue