<commit_before><?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

require APPPATH.'modules/users/third_party/hybridauth/Hybrid/Auth.php';

class HybridAuthLib extends Hybrid_Auth
{

    /**
     * A pointer to the CodeIgniter instance.
     *
     * @access private
     *
     * @var object
     */
    private $ci;

    function __construct($config = array())
    {
        $this->ci = & get_instance();
        $this->ci->load->helper('url_helper');
        $this->ci->load->model('user_model');
        $loc_config = module_config('users');

        $config = $this->ci->user_model->get_config();
        //TODO:introduce debug mode
//        $config['debug_mode'] = $loc_config['debug_mode'];
//        $config['debug_file'] = $loc_config['debug_file'];
        $config['base_url'] = site_url() . $loc_config['base_url'];

        parent::__construct($config);

        log_message('debug', 'HybridAuthLib Class Initalized');
    }

    public static function providerEnabled($provider)
    {
        return isset(parent::$config['providers'][$provider]) && parent::$config['providers'][$provider]['enabled'];
    }
}

/* End of file HybridAuthLib.php */
/* Location: ./application/libraries/HybridAuthLib.php */<commit_msg>Made another proper redirect to user module<commit_after><?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

require APPPATH.'modules/users/third_party/hybridauth/Hybrid/Auth.php';

class HybridAuthLib extends Hybrid_Auth
{

    /**
     * A pointer to the CodeIgniter instance.
     *
     * @access private
     *
     * @var object
     */
    private $ci;

    function __construct($config = array())
    {
        $this->ci = & get_instance();
        $this->ci->load->helper('url_helper');
        $this->ci->load->model('users/user_model');
        $loc_config = module_config('users');

        $config = $this->ci->user_model->get_config();
        //TODO:introduce debug mode
//        $config['debug_mode'] = $loc_config['debug_mode'];
//        $config['debug_file'] = $loc_config['debug_file'];
        $config['base_url'] = site_url() . $loc_config['base_url'];

        parent::__construct($config);

        log_message('debug', 'HybridAuthLib Class Initalized');
    }

    public static function providerEnabled($provider)
    {
        return isset(parent::$config['providers'][$provider]) && parent::$config['providers'][$provider]['enabled'];
    }
}

/* End of file HybridAuthLib.php */
/* Location: ./application/libraries/HybridAuthLib.php */
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.0, 'mean_word_length': 3.195723684210526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '6254888', 'n_tokens_mistral': 776, 'n_tokens_neox': 760, 'n_words': 136}