mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +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) {
|
UserReset.cleanByUid = async function (uid) {
|
||||||
const tokensToClean = [];
|
const tokensToClean = [];
|
||||||
uid = parseInt(uid, 10);
|
uid = parseInt(uid, 10);
|
||||||
|
if (!uid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await batch.processSortedSet('reset:issueDate', async (tokens) => {
|
await batch.processSortedSet('reset:issueDate', async (tokens) => {
|
||||||
const results = await db.getObjectFields('reset:uid', tokens);
|
const results = await db.getObjectFields('reset:uid', tokens);
|
||||||
|
|||||||
Reference in New Issue
Block a user