mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +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,
|
'x-csrf-token': config.csrf_token,
|
||||||
},
|
},
|
||||||
success: function (data) {
|
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 () {
|
app.updateHeader(data, function () {
|
||||||
// Overwrite in hook (below) to redirect elsewhere
|
// Overwrite in hook (below) to redirect elsewhere
|
||||||
data.next = data.next || undefined;
|
data.next = data.next || undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user