mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: parseInt caller.uid closes #10849
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user