Reputation: 980
When a user logged in, after some time the session times out and redirects to the home page.
Does anyone know why this may be occurring?
Following code is used for logout:
if($user->isLogged())
{
$user->logout();
$session->set('error','Successfully Logged Out');
$response->redirect('index.php');
}
function logout() {
$this->session->delete('user_id');
$this->data = array();
}
function isLogged() {
return !empty($this->data);
}
Is there any way for increasing session time?
Upvotes: 2
Views: 154