mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: #7118, invoking autoLocale middleware on logout
Also: - firing client-side hook on header update - updating bootbox locale on header update
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user