Page 1 of 1

Auto logout non active users with custom code

Posted: Tue Oct 15, 2024 11:53 pm
by vintoICT

Your user table must have activate colum INT 0 for non active 1 for active

put this code after the last closing </html> tag in layout.php
<?php
//custom check active

if (IsLoggedIn()) {


$activestatus = CurrentUserInfo("activate");
if($activestatus==0){header("Location: logout");}

}

?>