-
Notifications
You must be signed in to change notification settings - Fork 92
/
verify-email.php
27 lines (26 loc) · 1.01 KB
/
verify-email.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?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="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript">
function resendEmail() {
jQuery.post({
url: 'https://<?php echo $domain ?>/api/users/<?php echo $userId ?>/send_verification_email',
dataType: 'html',
contentType: 'application/json',
headers: {
'Authorization': "Bearer <?php echo $token ?>"
},
success: function (resp) {
alert("An email was sent to <?php echo $email?>" );
}
}).fail(function() {
alert("Sorry, something went wrong");
})
}
document.getElementById("resend").onclick = function () {
resendEmail();
}
</script>