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

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

@ -122,16 +122,7 @@ app.isConnected = false;
} }
function onEventBanned() { 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 + '/'; window.location.href = config.relative_path + '/';
}, 1000);
} }
}()); }());

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

Loading…
Cancel
Save