<commit_before><?php

//  Include NAILS_Auth_Controller; executes common Auth functionality.
require_once '_auth.php';

/**
 * User login facility
 *
 * @package     Nails
 * @subpackage  module-auth
 * @category    Controller
 * @author      Nails Dev Team
 * @link
 */
class NAILS_Login extends NAILS_Auth_Controller
{
    /**
     * Construct the controller
     */
    public function __construct()
    {
        parent::__construct();

        // --------------------------------------------------------------------------

        //  Load libraries
        $this->load->library('form_validation');
        $this->load->library('auth/social_signon');

        // --------------------------------------------------------------------------

        //  Where are we returning user to?
        $returnTo = $this->input->get('return_to');

        if ($returnTo) {

            $returnTo = preg_match('#^(http|https)\://#', $returnTo) ? $returnTo : site_url($returnTo);
            $returnTo = parse_url($returnTo);

            //  urlencode the query if there is one
            if (!empty($returnTo['query'])) {

                //  Break it apart and glue it together (urlencoded)
                $query = parse_str($returnTo['query'], $query_ar);
                $returnTo['query'] = http_build_query($query_ar);
            }

            $this->data['return_to']  = '';
            $this->data['return_to'] .= !empty($returnTo['scheme'])   ? $returnTo['scheme'] . '://' : 'http://';
            $this->data['return_to'] .= !empty($returnTo['host'])     ? $returnTo['host']           : site_url();
            $this->data['return_to'] .= !empty($returnTo['path'])     ? $returnTo['path']           : '';
            $this->data['return_to'] .= !empty($returnTo['query'])    ? '?' . $returnTo['query']    : '';

        } else {

            $this->data['return_to'] = '';
        }

        // --------------------------------------------------------------------------

        //  Specify a default title for this page
        $this->data['page']->title = lang('auth_title_login');
    }

    // --------------------------------------------------------------------------

    /**
     * Validate data and log the user in.
     * @return  void
     **/
    public function index()<commit_msg>Considering host in login.php redirect<commit_after><?php

//  Include NAILS_Auth_Controller; executes common Auth functionality.
require_once '_auth.php';

/**
 * User login facility
 *
 * @package     Nails
 * @subpackage  module-auth
 * @category    Controller
 * @author      Nails Dev Team
 * @link
 */
class NAILS_Login extends NAILS_Auth_Controller
{
    /**
     * Construct the controller
     */
    public function __construct()
    {
        parent::__construct();

        // --------------------------------------------------------------------------

        //  Load libraries
        $this->load->library('form_validation');
        $this->load->library('auth/social_signon');

        // --------------------------------------------------------------------------

        //  Where are we returning user to?
        $returnTo = $this->input->get('return_to');

        if ($returnTo) {

            $returnTo = preg_match('#^(http|https)\://#', $returnTo) ? $returnTo : site_url($returnTo);
            $returnTo = parse_url($returnTo);

            //  urlencode the query if there is one
            if (!empty($returnTo['query'])) {

                //  Break it apart and glue it together (urlencoded)
                $query = parse_str($returnTo['query'], $query_ar);
                $returnTo['query'] = http_build_query($query_ar);
            }

            $this->data['return_to']  = '';
            $this->data['return_to'] .= !empty($returnTo['scheme']) ? $returnTo['scheme'] . '://' : 'http://';
            $this->data['return_to'] .= !empty($returnTo['host']) ? $returnTo['host'] : site_url();
            $this->data['return_to'] .= !empty($returnTo['port']) ? ':' . $returnTo['port'] : '';
            $this->data['return_to'] .= !empty($returnTo['path']) ? $returnTo['path'] : '';
            $this->data['return_to'] .= !empty($returnTo['query']) ? '?' . $returnTo['query'] : '';

        } else {

            $this->data['return_to'] = '';
        }

        // --------------------------------------------------------------------------
die($this->data['return_to']);
        //  Specify a default title for this page
        $this->data['page']->title = lang('auth_title_login');
    }

    // --------------------------------------------------------------------------

    /**
     * Validate data and log the user in.
     * @return  void
     **/
    public function index()
{'fraction_non_alphanumeric': 0.2799575821845175, 'fraction_numerical': 0.0, 'mean_word_length': 1.452418096723869, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '1521670', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1206, 'n_words': 237}