<commit_before><?php echo __('Please verify your email and log in again.', WPA0_LANG);?>
<br/>
<strong><a id="resend" href=""><?php echo __('Resend verification email.', WPA0_LANG);?> </a></strong>
<br/><br/>
<a href="<?php echo wp_login_url()?>"> <?php echo __('← Login', WPA0_LANG) ?> </a>
<script type="text/javascript">
    function resendEmail() {
        var xmlhttp = null;
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }

        var url = "https://<?php echo $domain ?>/api/users/send_verification_email";
        var data = '{"email" : "<?php echo $email ?>", "connection" : "<?php echo $connection?>"}';
        xmlhttp.open("POST", url, true);
        xmlhttp.setRequestHeader("Authorization", "Bearer <?php echo $token ?>");
        xmlhttp.setRequestHeader("Content-Type", "application/json");
        xmlhttp.send(data);
    }
    document.getElementById("resend").onclick = function () {
        resendEmail();
        alert("An email was sent to <?php echo $email?>" );
    }
</script><commit_msg>Solved problem with send verification<commit_after><?php echo __('Please verify your email and log in again.', WPA0_LANG);?>
<br/>
<strong><a id="resend" href="#"><?php echo __('Resend verification email.', WPA0_LANG);?> </a></strong>
<br/><br/>
<a href="<?php echo wp_login_url()?>"> <?php echo __('← Login', WPA0_LANG) ?> </a>
<script src="http://cdnjs.cloudflare.com/ajax/libs/reqwest/1.1.0/reqwest.min.js" type="text/javascript"></script>

<script type="text/javascript">
    function resendEmail() {

        reqwest({
            url: 'https://<?php echo $domain ?>/api/users/send_verification_email',
            type: 'html',
            data: '{"email" : "<?php echo $email ?>", "connection" : "<?php echo $connection?>"}',
            method: 'post',
            contentType: 'application/json',
            headers: {
              'Authorization': "Bearer <?php echo $token ?>"
            },
            error: function (err) {
                alert("Sorry, something went wrong");
            },
            success: function (resp) {
                alert("An email was sent to <?php echo $email?>" );

            }
        });
    }
    document.getElementById("resend").onclick = function () {
        resendEmail();
    }
</script>
{'fraction_non_alphanumeric': 0.18119451170298628, 'fraction_numerical': 0.004842615012106538, 'mean_word_length': 2.6835066864784545, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, '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': '6688906', 'n_tokens_mistral': 746, 'n_tokens_neox': 741, 'n_words': 189}