Welcome Guest, Not a member yet? Register   Sign In
using is_logged_in() function
#1

[eluser]Unknown[/eluser]
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.
#2

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

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




Theme © iAndrew 2016 - Forum software by © MyBB