Shun Miyazawa 2 лет назад
Родитель
Сommit
740d739b47
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      apps/app/src/server/models/user.js

+ 2 - 2
apps/app/src/server/models/user.js

@@ -717,8 +717,8 @@ module.exports = function(crowi) {
       return false;
     }
 
-    const isExist = (await this.count({ username })) > 0;
-    return isExist;
+    const user = await this.exists({ username });
+    return user != null;
   };
 
   userSchema.statics.updateIsInvitationEmailSended = async function(id) {