mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +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();
|
Chat.prepareDOM();
|
||||||
app.reskin(data.config.bootswatchSkin);
|
app.reskin(data.config.bootswatchSkin);
|
||||||
translator.switchTimeagoLanguage(callback);
|
translator.switchTimeagoLanguage(callback);
|
||||||
|
bootbox.setLocale(config.userLang);
|
||||||
|
$(window).trigger('action:app.updateHeader');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ authenticationController.logout = function (req, res, next) {
|
|||||||
function (next) {
|
function (next) {
|
||||||
plugins.fireHook('static:user.loggedOut', { req: req, res: res, uid: req.uid }, next);
|
plugins.fireHook('static:user.loggedOut', { req: req, res: res, uid: req.uid }, next);
|
||||||
},
|
},
|
||||||
|
async.apply(middleware.autoLocale, req, res),
|
||||||
function () {
|
function () {
|
||||||
// Force session check for all connected socket.io clients with the same session id
|
// Force session check for all connected socket.io clients with the same session id
|
||||||
sockets.in('sess_' + req.sessionID).emit('checkSession', 0);
|
sockets.in('sess_' + req.sessionID).emit('checkSession', 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user