If a user's session has expired, they are sent to the log-in. After they log in, I'd like to take them back to the page they were trying to access. What's the easiest way to do this? Is there something I can pass the login page to redirect back?
I must be doing it wrong. In my code when I use a function to determine if the current user is authorized to view the current page. The first thing it does is the following:
if (!$CI->fuel->auth->is_logged_in())
{
return FALSE;
}
if ($CI->fuel->auth->is_super_admin())
{
return TRUE;
}
Upon returning FALSE, the following is displayed:
You are not authorized to view this project or you may need to
<a href="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/navserver/fuel' ?>">Log In</a><br/>
Is there a way I should be doing this differently?
Comments
if (!$CI->fuel->auth->is_logged_in()) { return FALSE; } if ($CI->fuel->auth->is_super_admin()) { return TRUE; }
Upon returning FALSE, the following is displayed:
You are not authorized to view this project or you may need to <a href="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/navserver/fuel' ?>">Log In</a><br/>
Is there a way I should be doing this differently?
$CI->fuel->admin->check_login();
Added this and now it seems to work the way I want it to.