[eluser]druid100[/eluser]
hi,
to protect certain functions within my controllers i check within my auth library if the user is logged in. if he is not logged in i redirect him to the login page. however i noticed that after redirect() the program flow continues.
so i seed two choices:
1) write the controller function like this:
function my()
{
if ( !$this->auth->noGuestAccess() )
return;
}
2) write the noGuestAccess() function like
function noGuestAccess()
{
.
.
.
redirect('');
exit();
}
what style would you prefer? exit() is quite harsh ...