summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorOle Langbehn <ole.langbehn@inoio.de>2019-03-16 14:25:04 +0100
committerOle Langbehn <ole.langbehn@inoio.de>2019-03-16 14:32:39 +0100
commit40a3267615d34b011acbf19d6706a85d98e2e8fb (patch)
treeecfa3de83bfb5d05f4dcf28b41c62cd28246865d /client
parentff19d6744e3f4a944944185d41b944310f35fc36 (diff)
downloadwekan-40a3267615d34b011acbf19d6706a85d98e2e8fb.tar.gz
wekan-40a3267615d34b011acbf19d6706a85d98e2e8fb.tar.bz2
wekan-40a3267615d34b011acbf19d6706a85d98e2e8fb.zip
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.
Diffstat (limited to 'client')
-rw-r--r--client/components/settings/settingBody.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index 2f58d551..8279a092 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -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'));