mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
add loggedIn state to template parsing
This commit is contained in:
@@ -321,6 +321,8 @@ middleware.processRender = function(req, res, next) {
|
|||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
options.loggedIn = req.user ? parseInt(req.user.uid, 10) !== 0 : false;
|
||||||
|
|
||||||
if ('function' !== typeof fn) {
|
if ('function' !== typeof fn) {
|
||||||
fn = defaultFn;
|
fn = defaultFn;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user