Procházet zdrojové kódy

create existing list

itizawa před 6 roky
rodič
revize
35ed30d942
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  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();