Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function log_in()
- {
- $emailadres = $this->input->post('email');
- $wachtwoord = ($this->input->post('password'));
- $result = $this->user_model->login($emailadres, $wachtwoord);
- if ($result[0]->role_id == 1) {
- $this->user_model->add_login();
- $this->log();
- redirect('admin/welcome_admin', 'refresh');
- }
- if ($result[0]->role_id == 2) {
- $this->user_model->add_login();
- $this->log();
- redirect('manager/welcome_manager', 'refresh');
- }
- if ($result[0]->role_id == 3) {
- $this->user_model->add_login();
- $this->log();
- redirect('edumed/welcome_edumed', 'refresh');
- }
- if ($result[0]->role_id == 4) {
- $this->user_model->add_login();
- $this->log();
- redirect('salesman/welcome_salesman', 'refresh');
- } else {
- $this->user_model->add_login_attempt();
- $this->log();
- echo "Login mislukt, probeer opnieuw";
- $this->login();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement