mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
FIX: proper redirection when deleting a user
This commit is contained in:
parent
b65ac132b7
commit
8edf2afb83
|
@ -331,7 +331,11 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
data: formData
|
||||
}).then(function(data) {
|
||||
if (data.deleted) {
|
||||
document.location = location;
|
||||
if (/^\/admin\/users\/list\//.test(location)) {
|
||||
document.location = location;
|
||||
} else {
|
||||
document.location = "/admin/users/list/active";
|
||||
}
|
||||
} else {
|
||||
bootbox.alert(I18n.t("admin.user.delete_failed"));
|
||||
if (data.user) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user