using is_logged_in() function

hello all, i m new with codeigniter, and trying to create a social netwoking website just to understand mode about codeigniter. Thus i've created a is_logged_in() and want to use it with more than once controller, how should i use it whether to use it with autoload() function or create a basecontroller for this, which is more efficient way.

[eluser]TWP Marketing[/eluser]
The base controller is the better way to handle this.

Use this..
if ($this->session->userdata('is_logged_in') == TRUE) {
load this view;
} else {
load this view;

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.