Welcome Guest, Not a member yet? Register   Sign In
Logout problem
#1

[eluser]Gowrisankar[/eluser]
Hi...

When i am logout the page backspace is allow to back. I want to disable backspace.
for example when you sign-out gmail that won't allow back.
i need that way to log-out.
I hope anyone help in this forum.....

This is my log-out function coding...
function logout()
{
if($this->session->userdata('uid')!='')
{
$this->session->session_destroy();
redirect('home','refresh');
}
else
{
$this->session->session_destroy();
redirect('home','refresh');
}
}
#2

[eluser]Gowrisankar[/eluser]
Hi...

When i am logout the page backspace is allow to back. I want to disable backspace.
for example when you sign-out gmail that won't allow back.
i need that way to log-out.
I hope anyone help in this forum.....

This is my log-out function coding...
function logout()
{
if($this->session->userdata('uid')!='')
{
$this->session->sess_destroy();
redirect('home','refresh');
}
else
{
$this->session->sess_destroy();
redirect('home','refresh');
}
}
#3

[eluser]Gowrisankar[/eluser]
Hi...

When i am logout the page backspace is allow to back. I want to disable backspace.
for example when you sign-out gmail that won't allow back.
i need that way to log-out.
I hope anyone help in this forum.....

This is my log-out function coding...
function logout()
{
if($this->session->userdata('uid')!='')
{
$this->session->sess_destroy();
redirect('home','refresh');
}
else
{
$this->session->sess_destroy();
redirect('home','refresh');
}
}
#4

[eluser]Deathcode[/eluser]
Try this code....

Code:
function __construct(){
parent::Controller();
$this->is_logged_in();    
}
    
function is_logged_in(){
$is_logged_in = $this->session->userdata('is_logged_in');
        
if(!isset($is_logged_in)||$is_logged_in != True){
echo "You have logout or your session is expired. Please Login again" ;
die();
}
}

but you have to create session/cookies that saved the value of "is_logged_in" on your login controller and destroy it session/cookies when you logout.
#5

[eluser]minerbog[/eluser]
Please only post in one place. Preferably the right place...

This forum is for bug reports not problems




Theme © iAndrew 2016 - Forum software by © MyBB