Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]Ben Edmunds[/eluser]
Hey crashfellow,

The redirect function will insert your base_url.

You wouldn't shift the functionality but you would do the checking there. So in MY_controller you would check if the user is logged in and if not redirect to auth/login.



And please don't do this, this really sucks:

Code:
$this->ion_auth->logged_in() or redirect('auth/login');

Phil is going through a very hard time right now as he struggles with his sexual orientation and his code is suffering greatly for it.

Do this instead:

Code:
if (!$this->ion_auth->logged_in())
    redirect('auth/login');

or even this if you're desperate for white space:

Code:
if (!$this->ion_auth->logged_in()) redirect('auth/login');


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 05-11-2010, 11:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB