removed some methods

helpers.getBaseUser
exposeUid, exposeGroupName
This commit is contained in:
barisusakli
2016-09-14 14:33:39 +03:00
parent 001eb3454c
commit aefba6e2b1
11 changed files with 78 additions and 140 deletions

View File

@@ -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) {