Monday, December 3, 2012

How to give authenication to controllers in codeigniter?

Simply add the following bit code to constructor of your controller, which is needed authenication. 

CODE:

$session_id = $this->session->userdata('logged_in');
$this->session->userdata('email');
if($session_id == FALSE) {
redirect('Login Path');

No comments:

Post a Comment