banned users cant login, show error messages on failed logins

This commit is contained in:
Baris Usakli
2013-08-14 15:49:56 -04:00
parent 9ad82f4907
commit 74af205426
6 changed files with 34 additions and 12 deletions

View File

@@ -27,11 +27,15 @@
url: RELATIVE_PATH + '/login',
data: loginData,
success: function(data, textStatus, jqXHR) {
$('#login-error-notify').hide();
window.location.replace(RELATIVE_PATH + "/?loggedin");
if(!data.success) {
$('#login-error-notify').html(data.message).show();
} else {
$('#login-error-notify').hide();
window.location.replace(RELATIVE_PATH + "/?loggedin");
}
},
error : function(data, textStatus, jqXHR) {
$('#login-error-notify').show().delay(1000).fadeOut(250);
$('#login-error-notify').show();
},
dataType: 'json',
async: true,