Welcome Guest, Not a member yet? Register   Sign In
two secure account areas
#3

[eluser]pdxbenjamin[/eluser]
$this->load->model('admin_model');
$data['logon'] = $this->admin_model->user_validate($user_id, $password);

if($data['logon'] == 1)
{
$data = array(
'membership' => $this->input->post('user_id'),
'is_logged_in_admin' => true
);
$this->session->set_userdata($data);
redirect('secure');

} else {

redirect('admin');

}

Set through sessions...

While I was typing out my question that solution came to mind however, admins and users have different data and I usually like to make more tables then have one big table sparsely filled.

I already have user permission levels and admin permission levels it wouldn't be too much to combine them....

But I was hoping to find out that the is_logged_in is just a crazy codeigniter constant that I could modify or make more of...


Messages In This Thread
two secure account areas - by El Forum - 04-24-2010, 06:10 PM
two secure account areas - by El Forum - 04-24-2010, 08:24 PM
two secure account areas - by El Forum - 04-24-2010, 08:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB