mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
restoring passwordExpiry for use in continueLogin, fixed tests, hopefully
This commit is contained in:
@@ -397,6 +397,7 @@ authenticationController.localLogin = function (req, username, password, next) {
|
||||
uid = _uid;
|
||||
|
||||
async.parallel({
|
||||
userData: async.apply(db.getObjectFields, 'user:' + uid, ['passwordExpiry']),
|
||||
isAdminOrGlobalMod: function (next) {
|
||||
user.isAdminOrGlobalMod(uid, next);
|
||||
},
|
||||
@@ -406,10 +407,10 @@ authenticationController.localLogin = function (req, username, password, next) {
|
||||
}, next);
|
||||
},
|
||||
function (result, next) {
|
||||
userData = {
|
||||
userData = Object.assign(result.userData, {
|
||||
uid: uid,
|
||||
isAdminOrGlobalMod: result.isAdminOrGlobalMod,
|
||||
};
|
||||
});
|
||||
|
||||
if (!result.isAdminOrGlobalMod && parseInt(meta.config.allowLocalLogin, 10) === 0) {
|
||||
return next(new Error('[[error:local-login-disabled]]'));
|
||||
|
||||
Reference in New Issue
Block a user