Node.js based forum software built for the modern web
moved req.user up
Barış Soner Uşaklıebd4b19a6574
diff --git a/src/routes/authentication.js b/src/routes/authentication.jsindex da289f1436..a958bac97b 100644--- a/src/routes/authentication.js+++ b/src/routes/authentication.js@@ -26,10 +26,10 @@ Auth.initialize = function (app, middleware) {Auth.setAuthVars = function (req, res, next) {var isSpider = req.isSpider();req.loggedIn = !isSpider && !!req.user;- if (isSpider) {- req.uid = -1;- } else if (req.user) {+ if (req.user) {req.uid = parseInt(req.user.uid, 10);+ } else if (isSpider) {+ req.uid = -1;} else {req.uid = 0;}