Skip to content

Node.js based forum software built for the modern web

fix: #7118, invoking autoLocale middleware on logout

Julian Lam900f0a0b7865
diff --git a/public/src/app.js b/public/src/app.js
index 2312a57a53..943eacf67a 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -147,6 +147,8 @@ app.cacheBuster = null;
Chat.prepareDOM();
app.reskin(data.config.bootswatchSkin);
translator.switchTimeagoLanguage(callback);
+ bootbox.setLocale(config.userLang);
+ $(window).trigger('action:app.updateHeader');
});
});
};
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js
index b2f456691d..e85c38e0f9 100644
--- a/src/controllers/authentication.js
+++ b/src/controllers/authentication.js
@@ -483,6 +483,7 @@ authenticationController.logout = function (req, res, next) {
function (next) {
plugins.fireHook('static:user.loggedOut', { req: req, res: res, uid: req.uid }, next);
},
+ async.apply(middleware.autoLocale, req, res),
function () {
// Force session check for all connected socket.io clients with the same session id
sockets.in('sess_' + req.sessionID).emit('checkSession', 0);