mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
make emails for invitations all lowercase for compatibility with AccountsTemplates
Email addresses for invitations are stored case sensitive in mongo, together with the invitation codes. When someone tries to sign up due to an invitation, in the sign up form, due to AccountsTemplates defaults, the email address is lowercased on blur of the textbox. When they then try to sign in, they get an error about the invitation code not existing. This makes it impossible to successfully invite people using non-lowercased email addresses. This patch lowercases the emails on the client side when inviting them. Other possibilities would be to lowercase them on the server side before storing them to mongodb, making a case insensitive search on mongodb, or making the email input field in the sign up form not lowercase the email string. This patch was chosen in favor of the other possibilities because of its simplicity.
This commit is contained in:
parent
ff19d6744e
commit
40a3267615
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
inviteThroughEmail() {
|
||||
const emails = $('#email-to-invite').val().trim().split('\n').join(',').split(',');
|
||||
const emails = $('#email-to-invite').val().toLowerCase().trim().split('\n').join(',').split(',');
|
||||
const boardsToInvite = [];
|
||||
$('.js-toggle-board-choose .materialCheckBox.is-checked').each(function () {
|
||||
boardsToInvite.push($(this).data('id'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue