mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
removed some methods
helpers.getBaseUser exposeUid, exposeGroupName
This commit is contained in:
@@ -13,10 +13,17 @@ sessionController.revoke = function(req, res, next) {
|
||||
}
|
||||
|
||||
var _id;
|
||||
|
||||
var uid;
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
db.getSortedSetRange('uid:' + res.locals.uid + ':sessions', 0, -1, next);
|
||||
user.getUidByUserslug(req.params.userslug, next);
|
||||
},
|
||||
function (_uid, next) {
|
||||
uid = _uid;
|
||||
if (!uid) {
|
||||
return next(new Error('[[error:no-session-found]]'));
|
||||
}
|
||||
db.getSortedSetRange('uid:' + uid + ':sessions', 0, -1, next);
|
||||
},
|
||||
function (sids, done) {
|
||||
async.eachSeries(sids, function(sid, next) {
|
||||
@@ -38,7 +45,7 @@ sessionController.revoke = function(req, res, next) {
|
||||
return next(new Error('[[error:no-session-found]]'));
|
||||
}
|
||||
|
||||
user.auth.revokeSession(_id, res.locals.uid, next);
|
||||
user.auth.revokeSession(_id, uid, next);
|
||||
}
|
||||
], function(err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user