the user login is maintained through session variables.
to maintain the users as being logged in, you will need to know the names of the sessions that are crteated at login type, save them to application variables, then reset them after the session is restarted.
for example, if the login script creates sessions name "UserID" and "UserName", you can modify the session destroy code to save them and reset them like this:
<?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();
//Save login sessions
if(isset($_SESSION['UserID'])) $UserID = $_SESSION['UserID'];
if(isset($_SESSION['UserName'])) $UserName = $_SESSION['UserName'];
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
@setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
// Finally, destroy the session.
@session_destroy();
@session_regenerate_id();
//Rest login sessions:
if(isset($UserID)) $_SESSION['UserID'] = $UserID;
f(isset($UserID)) $_SESSION['UserName'] = $UserName;
?>