bp_members_login_resend_activation_email()
On the login screen, resends the activation email for a user.
Description Description
See also See also
Source Source
File: bp-members/bp-members-functions.php
function bp_members_login_resend_activation_email() {
global $error;
if ( empty( $_GET['id'] ) || empty( $_GET['_wpnonce'] ) ) {
return;
}
// Verify nonce.
if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'bp-resend-activation' ) ) {
die( 'Security check' );
}
$signup_id = (int) $_GET['id'];
// Resend the activation email.
// also updates the 'last sent' and '# of emails sent' values.
$resend = BP_Signup::resend( array( $signup_id ) );
// Add feedback message.
if ( ! empty( $resend['errors'] ) ) {
$error = __( '<strong>ERROR</strong>: Your account has already been activated.', 'buddypress' );
} else {
$error = __( 'Activation email resent! Please check your inbox or spam folder.', 'buddypress' );
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |