Node.js based forum software built for the modern web
closes #5333
barisusakli6b2dde02b57e
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.jsindex 4612226d59..90a1715cbb 100644--- a/src/controllers/authentication.js+++ b/src/controllers/authentication.js@@ -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);},function (next) {user.updateLastOnlineTime(uid, next);diff --git a/test/authentication.js b/test/authentication.jsindex e3ab49a5f5..fb26e0bfbf 100644--- a/test/authentication.js+++ b/test/authentication.js@@ -120,7 +120,12 @@ describe('authentication', function () {assert(body);assert.equal(body.username, 'regular');assert.equal(body.email, '[email protected]');- done();+ db.getObject('uid:' + regularUid + ':sessionUUID:sessionId', function (err, sessions) {+ assert.ifError(err);+ assert(sessions);+ assert(Object.keys(sessions).length > 0);+ done();+ });});});});