# BuddyPress: Email the Admin When a Member Activates

> Emails the site admin when a new member activates their BuddyPress account, with a link to their profile.

- Type: PHP
- Runs: Run everywhere
- Category: [Users](https://wpide.com/library/category/users/)
- Tags: buddypress, registration, email
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/buddypress-email-admin-new-member/

## Code

```php
if ( ! function_exists( 'buddypress' ) ) {
    return;
}

add_action( 'bp_core_activated_user', function ( $user_id ) {
    $user = get_userdata( $user_id );

    if ( ! $user ) {
        return;
    }

    $profile = function_exists( 'bp_members_get_user_url' ) ? bp_members_get_user_url( $user_id ) : bp_core_get_user_domain( $user_id );

    wp_mail(
        get_option( 'admin_email' ),
        sprintf( '[%s] New member: %s', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $user->display_name ),
        sprintf( "%s (%s) has activated their account.\n\nProfile: %s", $user->display_name, $user->user_email, $profile )
    );
} );
```

## Notes

Fires once the member has clicked their activation link, so unconfirmed spam sign-ups are not reported.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "BuddyPress: Email the Admin When a Member Activates" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
