mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Merge pull request #2720 from whowillcare/master
if username contains space, @ functions will fail at certain point
This commit is contained in:
commit
814e264521
5 changed files with 44 additions and 27 deletions
|
|
@ -561,6 +561,7 @@ Users.mutations({
|
|||
Meteor.methods({
|
||||
setUsername(username, userId) {
|
||||
check(username, String);
|
||||
check(userId, String);
|
||||
const nUsersWithUsername = Users.find({ username }).count();
|
||||
if (nUsersWithUsername > 0) {
|
||||
throw new Meteor.Error('username-already-taken');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue