Welcome Guest, Not a member yet? Register   Sign In
logout sometimes not working and need to logout again

Dear all,

I have below to handle logout and display information in the header to show after logout. But sometimes, it is unsuccessful. I suspect whether it is good to write this code to handle. Do you have any ideas? Please help

public function logout(){
        redirect(base_url()); }

In header section of the php page:

<?php $usr = $this->nativesession->get('user');
     if(!isset($usr) || empty($usr) || $usr["username"]==null) {
               // show login button

Theme © iAndrew 2016 - Forum software by © MyBB