From cb7768d095dd8aa99a7f42188a1de58a4d52a00d Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 30 Sep 2013 16:04:54 -0400 Subject: [PATCH] cant ban yourself --- public/src/forum/admin/users.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/forum/admin/users.js b/public/src/forum/admin/users.js index eb06cfc50a..4f9ba9dc88 100644 --- a/public/src/forum/admin/users.js +++ b/public/src/forum/admin/users.js @@ -20,8 +20,8 @@ function updateUserButtons() { jQuery('.ban-btn').each(function(index, element) { var banBtn = $(element); - - if (isUserAdmin(banBtn)) + var uid = getUID(banBtn); + if (isUserAdmin(banBtn) || uid === yourid) banBtn.addClass('disabled'); else if (isUserBanned(banBtn)) banBtn.addClass('btn-warning');