mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
cant ban yourself
This commit is contained in:
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user