Shun Miyazawa 4 лет назад
Родитель
Сommit
897797c9b6
1 измененных файлов с 0 добавлено и 29 удалено
  1. 0 29
      src/server/models/user.js

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

@@ -598,35 +598,6 @@ module.exports = function(crowi) {
     return { existingEmailList, createdUserList, failedToCreateUserEmailList };
   };
 
-  userSchema.statics.sendEmailbyUserList = async function(userList) {
-    const { appService, mailService } = crowi;
-    const appTitle = appService.getAppTitle();
-
-    await Promise.all(userList.map(async(user) => {
-      if (user.password == null) {
-        return;
-      }
-
-      try {
-        return mailService.send({
-          to: user.email,
-          subject: `Invitation to ${appTitle}`,
-          template: path.join(crowi.localeDir, 'en_US/admin/userInvitation.txt'),
-          vars: {
-            email: user.email,
-            password: user.password,
-            url: crowi.appService.getSiteUrl(),
-            appTitle,
-          },
-        });
-      }
-      catch (err) {
-        return debug('fail to send email: ', err);
-      }
-    }));
-
-  };
-
   userSchema.statics.createUserByEmailAndPasswordAndStatus = async function(name, username, email, password, lang, status, callback) {
     const User = this;
     const newUser = new User();