Skip to content

Node.js based forum software built for the modern web

fix: parseInt caller.uid closes #10849

Barış Soner Uşaklıbc37a5c51656
diff --git a/src/api/users.js b/src/api/users.js
index aa1ea25687..abc295acfd 100644
--- a/src/api/users.js
+++ b/src/api/users.js
@@ -305,7 +305,7 @@ async function isPrivilegedOrSelfAndPasswordMatch(caller, data) {
async function processDeletion({ uid, method, password, caller }) {
const isTargetAdmin = await user.isAdministrator(uid);
- const isSelf = parseInt(uid, 10) === caller.uid;
+ const isSelf = parseInt(uid, 10) === parseInt(caller.uid, 10);
const isAdmin = await user.isAdministrator(caller.uid);
if (isSelf && meta.config.allowAccountDelete !== 1) {