05-06-2019, 08:46 AM
Sorry. It took me a second. Try this in usersc/scripts/custom_login_script.php
$sessions = fetchUserSessions();
if($sessions){
$count = count($sessions);
if($count > 1){
$sessions = array_reverse($sessions);
foreach($sessions as $k=>$v){
if($k != 0){
killSessions($sessions[$k]);
}
}
}
}
$sessions = fetchUserSessions();
if($sessions){
$count = count($sessions);
if($count > 1){
$sessions = array_reverse($sessions);
foreach($sessions as $k=>$v){
if($k != 0){
killSessions($sessions[$k]);
}
}
}
}