Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //see if the user still needs to login
- if( ! $this->authentica->is_logged_in())
- {
- //load the user model
- $this->load->model('user_model');
- //complete a login
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- $user = $this->user_model->get_username_password($username, $password);
- if( ! $user)
- {
- echo "Wrong username and password combination";
- return true;
- }
- //tell the authentication library to login
- $this->authentica->login($user->id);
- //continue on
- }
- //redirect to the post login controller/function
- redirect('post/login');
Add Comment
Please, Sign In to add comment