Node.js based forum software built for the modern web
fix: #11729, only check registered users
Barış Soner Uşaklı090a792168d7
diff --git a/src/middleware/user.js b/src/middleware/user.jsindex 6170c8cc00..c9713df9aa 100644--- a/src/middleware/user.js+++ b/src/middleware/user.js@@ -239,7 +239,7 @@ module.exports = function (middleware) {*/const path = req.path.startsWith('/api/') ? req.path.replace('/api', '') : req.path;- if (req.uid && !(path.endsWith('/edit/email') || path.startsWith('/confirm/'))) {+ if (req.uid > 0 && !(path.endsWith('/edit/email') || path.startsWith('/confirm/'))) {const [confirmed, isAdmin] = await Promise.all([user.getUserField(req.uid, 'email:confirmed'),user.isAdministrator(req.uid),