Browse Source

Redirect put right

master
Rogier Neeleman 9 years ago
parent
commit
d5e94e4d52
  1. 7
      application/controllers/Login.php

7
application/controllers/Login.php

@ -16,8 +16,9 @@ class Login extends CI_Controller
{ {
// redirect if session exists // redirect if session exists
$this->load->library('session'); $this->load->library('session');
if(! $this->session->userdata('validated')){
redirect('/dashboard'); if($this->session->userdata('validated')){
redirect(base_url('/dashboard'));
} }
$this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('username', 'Username', 'required');
@ -84,7 +85,7 @@ class Login extends CI_Controller
$this->session->set_userdata($userdata); $this->session->set_userdata($userdata);
// Redirect to dashboard // Redirect to dashboard
redirect('/dashboard'); redirect(base_url('/dashboard'));
} }
} }

Loading…
Cancel
Save