From 9f8d80e3a48751d6b775d38d4a2d6555147f8d8b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 16 Apr 2017 14:22:40 -0400 Subject: [PATCH] closes #5600 --- src/database/mongo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index 91b41306f1..ae2ff77856 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -116,9 +116,9 @@ var meta = require('../meta'); var sessionStore; - var ttlDays = 1000 * 60 * 60 * 24 * (parseInt(meta.config.loginDays, 10) || 0); - var ttlSeconds = 1000 * (parseInt(meta.config.loginSeconds, 10) || 0); - var ttl = ttlSeconds || ttlDays || 1209600000; // Default to 14 days + var ttlDays = 60 * 60 * 24 * (parseInt(meta.config.loginDays, 10) || 0); + var ttlSeconds = (parseInt(meta.config.loginSeconds, 10) || 0); + var ttl = ttlSeconds || ttlDays || 1209600; // Default to 14 days in seconds if (nconf.get('redis')) { sessionStore = require('connect-redis')(session);