Right now there is no way built into the plugin to get an email when a user activates their account, but I like the idea. I will look at adding that to the next release. As of version 1.3.0 you can now silence the user registration emails if you like by hooking into the uae_admin_email filter and returning false.
add_filter('uae_admin_email', 'sagigreen_stop_uae_register_admin_email');
function sagigreen_stop_uae_register_admin_email($admin_email) {
return false;
}
I think this is what I wanted to do too; how/where do I put this code?
Will this stop the Admin emails for new registrations?
I found this code:
// you can skip the admin email if the uae_admin_email filter return false
$admin_email = apply_filters('uae_admin_email', get_option('admin_email'));
Do I inject it there?
please advise.
Later,
Larry
Add this code to your functions.php file or in a plugin to silence the admin emails on user registrations.
add_filter('uae_admin_email', 'lehenryjr_stop_uae_register_admin_email');
function lehenryjr_stop_uae_register_admin_email($admin_email) {
return false;
}
I just modified the “update_activation_code” function to achieve something like this. This works for me. (Did some ‘in comment’ modifications, so code might be invalid).
public function update_activation_code( $user_login )
{
// get user data by login
$user = get_user_by( 'login', $user_login );
$user_info = get_userdata($user->ID);
if('active' != get_user_meta( $user->ID, $this->user_meta, true )){
wp_mail(get_option( 'admin_email' ), __('New user'), 'Gebruiker: '.$user_info->user_login.__(' has activate his account.'));
// change the custom user meta to show the user has already activated
update_user_meta( $user->ID, $this->user_meta, 'active' );
}
}