v1.18.x
Baris Usakli 7 years ago
parent 14fbc0dc2f
commit c090ec301b

@ -177,7 +177,7 @@ module.exports = function (middleware) {
var disabled = parseInt(meta.config.adminReloginDuration, 10) === 0; var disabled = parseInt(meta.config.adminReloginDuration, 10) === 0;
if (disabled || (loginTime && parseInt(loginTime, 10) > Date.now() - adminReloginDuration)) { if (disabled || (loginTime && parseInt(loginTime, 10) > Date.now() - adminReloginDuration)) {
var timeLeft = parseInt(loginTime, 10) - (Date.now() - adminReloginDuration); var timeLeft = parseInt(loginTime, 10) - (Date.now() - adminReloginDuration);
if (req.session.meta && timeLeft < Math.min(300000, adminReloginDuration) ) { if (req.session.meta && timeLeft < Math.min(300000, adminReloginDuration)) {
req.session.meta.datetime += Math.min(300000, adminReloginDuration); req.session.meta.datetime += Math.min(300000, adminReloginDuration);
} }

Loading…
Cancel
Save