<commit_before><?php

class Login_cntrl extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->library('session');
        $this->load->model('UManage_model');
    }

    public function index()
    {
        //Get data from form
        $email = $this->input->post('email');
        $pass = $this->input->post('password');

        //check user on database
        $userlogged = $this->UManage_model->get_login($email, $pass);

        // read user's credentials from db, through Login Model
        if (isset($userlogged)) {
            $this->session->set_userdata('login_state', TRUE);
            $this->load->view('pages/home_view');
        } else {
            $this->load->view('A_login_view');    // redirect back to login page
        }
    }

    function logout()
    {
        $this->session->sess_destroy();
        redirect('a_login_view');
        $this->index();
    }
}<commit_msg>add login model<commit_after><?php

class Login_cntrl extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->library('session');
        $this->load->model('UManage_model');
    }

    public function index()
    {
        //Get data from form
        $email = $this->input->post('email');
        $pass = $this->input->post('password');

        //check user on database
        $userlogged = $this->UManage_model->get_login($email, $pass);

        // read user's credentials from db, through Login Model
        if (isset($userlogged)) {
            $this->session->set_userdata('login_state', TRUE);
            $this->load->view('pages/home_view');
        } else {
            $this->load->view('A_login_view');    // redirect back to login page
        }
    }

    function logout()
    {
        $this->session->sess_destroy();
        redirect('main');
        $this->index();
    }
}
{'fraction_non_alphanumeric': 0.15745568300312826, 'fraction_numerical': 0.0, 'mean_word_length': 2.1930116472545755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '353567', 'n_tokens_mistral': 567, 'n_tokens_neox': 553, 'n_words': 110}