mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 07:10:30 +01:00
fix: don't attempt user reset token cleaning if uid is not a number
This commit is contained in:
@@ -154,6 +154,9 @@ UserReset.clean = async function () {
|
||||
UserReset.cleanByUid = async function (uid) {
|
||||
const tokensToClean = [];
|
||||
uid = parseInt(uid, 10);
|
||||
if (!uid) {
|
||||
return;
|
||||
}
|
||||
|
||||
await batch.processSortedSet('reset:issueDate', async (tokens) => {
|
||||
const results = await db.getObjectFields('reset:uid', tokens);
|
||||
|
||||
Reference in New Issue
Block a user