Welcome Guest, Not a member yet? Register   Sign In
Trying To Redirect Non-Authenticated Users Via Constructor, Problems.
#5

[eluser]Codepeak[/eluser]
Or you can add "else" statement

// Make sure only an Administrator can use this controller
if ($this->session->userdata('user_group') != 'Administrator')
{
$data['title'] = 'Sorry, You Can\'t Do That';
$data['content'] = 'admin/not_admin';
$this->load->view('template', $data);
}
else
{
$data['title'] = 'My nice admin page';
$this->load->view('admin');
}

But I would rather build a proper auth library or use an existing.


Messages In This Thread
Trying To Redirect Non-Authenticated Users Via Constructor, Problems. - by El Forum - 11-07-2010, 03:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB