Przeglądaj źródła

apply globalLang to new user in createUserByEmailAndPasswordAndStatus.

Yuto Iwata 7 lat temu
rodzic
commit
b59e353339
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      src/server/models/user.js

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

@@ -751,6 +751,14 @@ module.exports = function(crowi) {
     if (password != null) {
     if (password != null) {
       newUser.setPassword(password);
       newUser.setPassword(password);
     }
     }
+
+    let Config = crowi.model('Config')
+      , config = crowi.getConfig();
+    const globalLang = Config.globalLang(config);
+    if (globalLang != null) {
+      newUser.lang = globalLang;
+    }
+
     if (lang != null) {
     if (lang != null) {
       newUser.lang = lang;
       newUser.lang = lang;
     }
     }