[eluser]mabright[/eluser]
I have a messages controller class for my website's internal private messaging system. Inside the class are functions to go to the various message folders (inbox, sent, trash, etc.).
I.e. mysite.com/member/messages/inbox equals a call to the inbox function in the messages controller.
The index function of my controller has a line for access control as follows to only allow logged in members to this area.
Code:
if($this->session->userdata('logged_in') != TRUE)
{
redirect('member/login');
}
Do I need to add this code to each public function in my controller or can I do this globally somehow in my controller?