View Single Post
  #6 (permalink)  
Old November 7th, 2009, 04:30 AM
phpcoder101 phpcoder101 is offline
Authorized User
 
Join Date: Nov 2009
Posts: 26
Thanks: 3
Thanked 0 Times in 0 Posts
Default Solved.

All the line in admin files have this line.

Code:
if ($_SESSION['userid'] < 1){
redirect('welcome/verify','refresh');

I changed to the following.

Code:
if (!isset($_SESSION['userid']) || $_SESSION['userid'] < 1){
	$this->session->set_flashdata('error',"You must log in!");  
    	redirect('welcome/verify','refresh');
Then it does not take you admin any more and take you to index page with flash message "You must log in".