diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 973158516c..7ab88f0570 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -321,6 +321,8 @@ middleware.processRender = function(req, res, next) { options = {}; } + options.loggedIn = req.user ? parseInt(req.user.uid, 10) !== 0 : false; + if ('function' !== typeof fn) { fn = defaultFn; }