mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
fix: #11257, onSuccessfulLogin called with improper uid
This commit is contained in:
@@ -154,7 +154,7 @@ Auth.reloadRoutes = async function (params) {
|
|||||||
}, Auth.middleware.validateAuth, (req, res, next) => {
|
}, Auth.middleware.validateAuth, (req, res, next) => {
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
async.apply(req.login.bind(req), res.locals.user, { keepSessionInfo: true }),
|
async.apply(req.login.bind(req), res.locals.user, { keepSessionInfo: true }),
|
||||||
async.apply(controllers.authentication.onSuccessfulLogin, req, req.uid),
|
async.apply(controllers.authentication.onSuccessfulLogin, req, res.locals.user.uid),
|
||||||
], (err) => {
|
], (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user