@ -319,7 +319,7 @@ authenticationController.onSuccessfulLogin = function (req, uid, callback) {
user.auth.addSession(uid, req.sessionID, next);
},
function (next) {
db.setObjectField('uid:' + uid + 'sessionUUID:sessionId', uuid, req.sessionID, next);
db.setObjectField('uid:' + uid + ':sessionUUID:sessionId', uuid, req.sessionID, next);
user.updateLastOnlineTime(uid, next);
@ -120,11 +120,16 @@ describe('authentication', function () {
assert(body);
assert.equal(body.username, 'regular');
assert.equal(body.email, 'regular@nodebb.org');
db.getObject('uid:' + regularUid + ':sessionUUID:sessionId', function (err, sessions) {
assert.ifError(err);
assert(sessions);
assert(Object.keys(sessions).length > 0);
done();
});
it('should revoke all sessions', function (done) {
var socketAdmin = require('../src/socket.io/admin');