Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Notification on Profile Update

@r-a-y

Keymaster

There’s a `do_action` hook you can use:
`xprofile_updated_profile` (located in /buddypress/bp-xprofile.php.)

You could potentially use the wp_mail() function to send an email to the admin with this hook.

Don’t know what a `do_action` is and how to make use of it?

If you’re familiar with a tiny bit of PHP, here’s some articles that will help:
http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/
https://codex.wordpress.org/Plugin_API#Actions

Here’s something quick you can try:

`function my_update_profile_send( $id ) {
$text = bp_core_get_user_domain( $id );
wp_mail( ‘YOUR ADMIN EMAIL ADDRESS’, ‘Profile Updated’, $text );
}
add_action( ‘xprofile_updated_profile’, ‘my_update_profile_send’ );`

Put the code snippet in your theme’s functions.php.

Skip to toolbar