itizawa 6 лет назад
Родитель
Сommit
35ed30d942
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      src/server/models/user.js

+ 5 - 0
src/server/models/user.js

@@ -617,6 +617,11 @@ module.exports = function(crowi) {
 
     const User = this;
     const createdUserList = [];
+
+    // The user is exists
+    const existingUserList = await User.find({ email: { $in: emailList }, userStatus: { $ne: STATUS_DELETED } });
+    const existingEmailList = existingUserList.map((user) => { return user.email });
+
     // TODO GW-206 move to anothor function
     // const mailer = crowi.getMailer();