v1.18.x
Julian Lam 9 years ago
parent f3c1e75cca
commit 60a97bcf51

@ -16,7 +16,7 @@ sessionController.revoke = function(req, res, next) {
async.waterfall([ async.waterfall([
function (next) { function (next) {
db.getSortedSetRange('uid:' + req.uid + ':sessions', 0, -1, next); db.getSortedSetRange('uid:' + res.locals.uid + ':sessions', 0, -1, next);
}, },
function (sids, done) { function (sids, done) {
async.eachSeries(sids, function(sid, next) { async.eachSeries(sids, function(sid, next) {
@ -38,7 +38,7 @@ sessionController.revoke = function(req, res, next) {
return next(new Error('[[error:no-session-found]]')); return next(new Error('[[error:no-session-found]]'));
} }
user.auth.revokeSession(_id, req.uid, next); user.auth.revokeSession(_id, res.locals.uid, next);
} }
], function(err) { ], function(err) {
if (err) { if (err) {

Loading…
Cancel
Save