<commit_before><?php

class BasicAuthPlugin extends MantisPlugin {
        function register() {
                $this->name        = 'BasicAuth Plugin';
                $this->description = 'Looks for REMOTE_USER in SERVER environment and autologins user.';
                $this->version     = '0.01';
                $this->requires    = array( 'MantisCore' => '1.2.0' );
                $this->author      = '<NAME>';
                $this->contact     = 'david.schmidt -at- univie.ac.at';
                $this->url         = '';
        }

        function init() {
                plugin_event_hook( 'EVENT_CORE_READY', 'autologin' );
        }

        function autologin() {
                if (auth_is_user_authenticated())
                        return;

                # REMOTE_USER is domain\username
                $t_user_id = user_get_id_by_name($_SERVER['REMOTE_USER']);

                # If user has a valid id, log in
                if ($t_user_id)   {
                        # Mantis Login
                        user_increment_login_count( $t_user_id );

                        user_reset_failed_login_count_to_zero( $t_user_id );
                        user_reset_lost_password_in_progress_count_to_zero( $t_user_id );

                        auth_set_cookies($t_user_id, true);
                        auth_set_tokens($t_user_id);
                }
        }
}
<commit_msg>rm copy&pasted comments<commit_after><?php

class BasicAuthPlugin extends MantisPlugin {
        function register() {
                $this->name        = 'BasicAuth Plugin';
                $this->description = 'Looks for REMOTE_USER in SERVER environment and autologins user.';
                $this->version     = '0.01';
                $this->requires    = array( 'MantisCore' => '1.2.0' );
                $this->author      = '<NAME>';
                $this->contact     = 'david.schmidt -at- univie.ac.at';
                $this->url         = '';
        }

        function init() {
                plugin_event_hook( 'EVENT_CORE_READY', 'autologin' );
        }

        function autologin() {
                if (auth_is_user_authenticated())
                        return;

                $t_user_id = user_get_id_by_name($_SERVER['REMOTE_USER']);
                if ($t_user_id)   {
                        user_increment_login_count( $t_user_id );
                        user_reset_failed_login_count_to_zero( $t_user_id );
                        user_reset_lost_password_in_progress_count_to_zero( $t_user_id );
                        auth_set_cookies($t_user_id, true);
                        auth_set_tokens($t_user_id);
                }
        }
}

{'fraction_non_alphanumeric': 0.10216256524981357, 'fraction_numerical': 0.0044742729306487695, 'mean_word_length': 1.4062780269058297, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '5864346', 'n_tokens_mistral': 812, 'n_tokens_neox': 738, 'n_words': 127}