<commit_before><?php
class Lucid_LDAP {
    public $domain;
    public $basedn;
    public $conn;
    public $logger;
    public $mailDomain;

    public function __construct($filename) {
        $config = parse_ini_file($filename);
        if(!$config)
            throw new Exception("No Config file found");
        $this -> domain = $config["domain"];
        $this -> basedn = $config["basedn"];
        $this -> userBaseDn = $config["userDn"];
        $this -> createUserDn = ldap_escape($config["createUserDn"].",$this->basedn");
        $this -> searchUserDn = ldap_escape($config["searchUserDn"].",$this->basedn");
        $this -> groupdn = ldap_escape("ou=groups,$this->basedn");
        $this -> conn = FALSE;
        $this -> logger = new Logger($config["logPath"]);
        $this -> url = $config['hostname'].":".$config['port'];
        $this -> VPN = $config['vpn'];
        $this -> SSH = $config['ssh'];
        $this -> tmpPath = $config['tmpPath'];
    }

    public function bind($username, $password){
        $this -> conn = ldap_connect($this -> url);
        $rdn = "$username@$this->domain";
        $status = ldap_bind($this -> conn, $rdn, $password);
        if(!$status){
            $this -> logger -> log("Lucid_LDAP::error::$username login failed.");
            throw new InvalidCredentialsException(ldap_error($this->conn));
        }
        $this -> logger -> log("Lucid_LDAP::info::$username login successful.");
        return $status;<commit_msg>Remove bad reference to userDn<commit_after><?php
class Lucid_LDAP {
    public $domain;
    public $basedn;
    public $conn;
    public $logger;
    public $mailDomain;

    public function __construct($filename) {
        $config = parse_ini_file($filename);
        if(!$config)
            throw new Exception("No Config file found");
        $this -> domain = $config["domain"];
        $this -> basedn = $config["basedn"];
        $this -> createUserDn = ldap_escape($config["createUserDn"].",$this->basedn");
        $this -> searchUserDn = ldap_escape($config["searchUserDn"].",$this->basedn");
        $this -> groupdn = ldap_escape("ou=groups,$this->basedn");
        $this -> conn = FALSE;
        $this -> logger = new Logger($config["logPath"]);
        $this -> url = $config['hostname'].":".$config['port'];
        $this -> VPN = $config['vpn'];
        $this -> SSH = $config['ssh'];
        $this -> tmpPath = $config['tmpPath'];
    }

    public function bind($username, $password){
        $this -> conn = ldap_connect($this -> url);
        $rdn = "$username@$this->domain";
        $status = ldap_bind($this -> conn, $rdn, $password);
        if(!$status){
            $this -> logger -> log("Lucid_LDAP::error::$username login failed.");
            throw new InvalidCredentialsException(ldap_error($this->conn));
        }
        $this -> logger -> log("Lucid_LDAP::info::$username login successful.");
        return $status;
{'fraction_non_alphanumeric': 0.18107556160653507, 'fraction_numerical': 0.0, 'mean_word_length': 2.7249683143219263, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 50, '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': '7418285', 'n_tokens_mistral': 874, 'n_tokens_neox': 872, 'n_words': 186}