v1.18.x
barisusakli 8 years ago
parent 1b34ebe230
commit ce9be7e694

@ -288,20 +288,14 @@ app.cacheBuster = null;
if (showWelcomeMessage) {
showWelcomeMessage = false;
if (document.readyState !== 'complete') {
$(document).ready(showAlert.bind(null, 'login'));
} else {
showAlert('login');
}
});
}
if (showBannedMessage) {
showBannedMessage = false;
if (document.readyState !== 'complete') {
$(document).ready(showAlert.bind(null, 'banned'));
} else {
showAlert('banned');
}
});
}
};

@ -122,16 +122,7 @@ app.isConnected = false;
}
function onEventBanned() {
app.alert({
title: '[[global:alert.banned]]',
message: '[[global:alert.banned.message]]',
type: 'danger',
timeout: 1000
});
setTimeout(function () {
window.location.href = config.relative_path + '/';
}, 1000);
window.location.href = config.relative_path + '/';
}
}());

@ -107,7 +107,7 @@ module.exports = function (middleware) {
if (results.banned) {
req.logout();
return res.redirect('/?banned=' + (results.banReason || ''));
return res.redirect('/?banned=' + (results.banReason || 'no-reason'));
}
results.user.isAdmin = results.isAdmin;

Loading…
Cancel
Save