Welcome Guest, Not a member yet? Register   Sign In
Checking to see if logged in when accessing Members Area
#5

[eluser]whitey5759[/eluser]
[quote author="mattpointblank" date="1257808679"]In my admin sections, I just put something like this at the top of every restricted method:

Code:
if(!$this->session->userdata('logged_in')) {
     redirect('user/login');
}

Simple and works.[/quote]

I use a similar approach however I create an extension of the Controller class, and therefore all Controllers you create that extend this will automatically get this functionality, and you don't have to copy-and-paste.


Messages In This Thread
Checking to see if logged in when accessing Members Area - by El Forum - 11-09-2009, 06:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB