CodeIgniter Forums
how restrict a user session ! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how restrict a user session ! (/showthread.php?tid=55419)



how restrict a user session ! - El Forum - 10-25-2012

[eluser]01munrra[/eluser]
Hello!!!

I have a function in a controller for restrict the users registered and the users not registered:

function valid()
{
if( $this->session->userdata('bandera') == false )
{ $this->index(); }
}

But, I want to use that function for restrict all system.....

How can I make for call that function in each controller?

thanks!!!


how restrict a user session ! - El Forum - 10-25-2012

[eluser]jojo777[/eluser]
Hi

Are you spanish? I ask cause i saw the 'bandera' I use to (También soy español)

Anyway this post can help you!


how restrict a user session ! - El Forum - 10-25-2012

[eluser]01munrra[/eluser]
yes, I am, I speak spanish..... thank you, I'm going to check that post.