Jelajahi Sumber

Merge branch 'master' into imprv/129221-correspond-prohibited-characters

soumaeda 2 tahun lalu
induk
melakukan
b48c70c444
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      apps/app/src/server/routes/apiv3/users.js

+ 2 - 1
apps/app/src/server/routes/apiv3/users.js

@@ -187,11 +187,12 @@ module.exports = (crowi) => {
   const sendEmailByUser = async(user) => {
   const sendEmailByUser = async(user) => {
     const { appService, mailService } = crowi;
     const { appService, mailService } = crowi;
     const appTitle = appService.getAppTitle();
     const appTitle = appService.getAppTitle();
+    const locale = configManager.getConfig('crowi', 'app:globalLang');
 
 
     await mailService.send({
     await mailService.send({
       to: user.email,
       to: user.email,
       subject: `New password for ${appTitle}`,
       subject: `New password for ${appTitle}`,
-      template: path.join(crowi.localeDir, 'en_US/admin/userResetPassword.ejs'),
+      template: path.join(crowi.localeDir, `${locale}/admin/userResetPassword.ejs`),
       vars: {
       vars: {
         email: user.email,
         email: user.email,
         password: user.password,
         password: user.password,