<commit_before><?php

    /**
     * Insert a new user that register on the website and send a mail to her email
     * @return String If sucefully added return a string
     * @return String If failed adding the user return a string
     */

    $name = $_POST['name'];
    $lastname = $_POST['lastname'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $email = $_POST['email'];

    $password = encrypt($password);

    $query = "INSERT INTO users (username, password, name, lastname, email, imageurl, idroles, userKey) VALUES('".$username."', '".$password."', '".$name."', '".$lastname."', '".$email."', 'error.png', 2, '".encrypt($username)."');";
    if ($link->query($query)) {
        echo "Registered user has successfully registered. We have sent an confirmation email.";
        if (isset($_POST['email']))  {
            $subject = 'Welcome '.$username.' to Cisadnetwork!';
            $comment = 'To activate your account, you must active your user visiting http://'.$_SERVER['HTTP_HOST'].'/validate.php?userKey='.encrypt($username).'.';
            mail($email, "$subject", $comment, "From:" . $email);
        }
    } else {
        echo $link->getError();
    }
    
?><commit_msg>Fixed error on addRegister.php<commit_after><?php

    /**
     * Insert a new user that register on the website and send a mail to her email
     * @return String If sucefully added return a string
     * @return String If failed adding the user return a string
     */

    $name = $_POST['name'];
    $lastname = $_POST['lastname'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $email = $_POST['email'];

    $password = <PASSWORD>($password);

    $query = "INSERT INTO users (username, password, name, lastname, email, imageurl, idroles, userKey) VALUES('".$username."', '".$password."', '".$name."', '".$lastname."', '".$email."', 'error.png', 2, '".encrypt($username)."');";
    if ($link->query($query)) {
        echo "Registered user has successfully registered. We have sent an confirmation email.";
        if (isset($_POST['email']))  {
            $subject = 'Welcome '.$username.' to Cisadnetwork!';
            $comment = 'To activate your account, you must active your user visiting http://'.$_SERVER['HTTP_HOST'].'/validate.php?userKey='.encrypt($username).'.';
            mail($email, "$subject", $comment, "From:".$email);
        }
    } else {
        echo $link->getError();
    }
    
?>
{'fraction_non_alphanumeric': 0.18354943273905996, 'fraction_numerical': 0.0008103727714748784, 'mean_word_length': 3.0675453047775947, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, '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': '1269425', 'n_tokens_mistral': 725, 'n_tokens_neox': 707, 'n_words': 218}