mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-11 18:13:04 +01:00
fix: #7063, logout code should do hard page nav to / or data.next
This commit is contained in:
@@ -164,6 +164,13 @@ app.cacheBuster = null;
|
||||
'x-csrf-token': config.csrf_token,
|
||||
},
|
||||
success: function (data) {
|
||||
// ACP logouts go to frontend via page load, not ajaxify
|
||||
if (ajaxify.data.template.name.startsWith('admin/')) {
|
||||
$(window).trigger('action:app.loggedOut', data);
|
||||
window.location.href = config.relative_path + (data.next || '/');
|
||||
return;
|
||||
}
|
||||
|
||||
app.updateHeader(data, function () {
|
||||
// Overwrite in hook (below) to redirect elsewhere
|
||||
data.next = data.next || undefined;
|
||||
|
||||
Reference in New Issue
Block a user