cant ban yourself

v1.18.x
Baris Usakli 12 years ago
parent 4290516d29
commit cb7768d095

@ -20,8 +20,8 @@
function updateUserButtons() { function updateUserButtons() {
jQuery('.ban-btn').each(function(index, element) { jQuery('.ban-btn').each(function(index, element) {
var banBtn = $(element); var banBtn = $(element);
var uid = getUID(banBtn);
if (isUserAdmin(banBtn)) if (isUserAdmin(banBtn) || uid === yourid)
banBtn.addClass('disabled'); banBtn.addClass('disabled');
else if (isUserBanned(banBtn)) else if (isUserBanned(banBtn))
banBtn.addClass('btn-warning'); banBtn.addClass('btn-warning');

Loading…
Cancel
Save