mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
use req.uid 👍
This commit is contained in:
@@ -53,7 +53,7 @@ middleware.pageView = function(req, res, next) {
|
|||||||
analytics.pageView({
|
analytics.pageView({
|
||||||
ip: req.ip,
|
ip: req.ip,
|
||||||
path: req.path,
|
path: req.path,
|
||||||
uid: req.hasOwnProperty('user') && req.user.hasOwnProperty('uid') ? parseInt(req.user.uid, 10) : 0
|
uid: req.uid
|
||||||
});
|
});
|
||||||
|
|
||||||
plugins.fireHook('action:middleware.pageView', {req: req});
|
plugins.fireHook('action:middleware.pageView', {req: req});
|
||||||
|
|||||||
Reference in New Issue
Block a user