I found a small code that you add to the template. Installed it on my server and works perfect. Will have to look into incorporating it into the core.
OPEN:
/etc/sentora/etc/styles/Sentora_Default/master.ztml
FIND: (near the bottom)
AFTER ADD:
SAVE/UPLOAD
CREATE FILE:
/etc/sentora/etc/styles/Sentora_Default/check.php
INSERT INTO 'check.php':
SAVE/UPLOAD
OPEN:
/etc/sentora/etc/styles/Sentora_Default/master.ztml
FIND: (near the bottom)
Code:
<!-- Modulelist for Typeahead -->
<script>
var moduleJsonData = <# ui_tpl_modulelistjson #>;
Sentora.modules.typeAhead(moduleJsonData);
</script>
AFTER ADD:
Code:
<!-- auto-logout JS -->
<script type="text/javascript">
$(document).ready(function(){
setInterval(function(){
$.get("<# ui_tpl_assetfolderpath #>check.php", function(data){
if(data==0) window.location.href="?logout";
});
},1*60*1000);
});
</script>
CREATE FILE:
/etc/sentora/etc/styles/Sentora_Default/check.php
INSERT INTO 'check.php':
PHP Code:
<?php
$timeOut = "120"; // (120 seconds = 2 minutes)
if(isset($_SESSION['timeout']) ) {
$session_life = time() - $_SESSION['timeout'];
if($session_life > $timeOut) echo "0";
else echo "1";
}
$_SESSION['timeout'] = time();
?>