在bp_core_signup_user中添加xprofile字段

时间:2014-08-09 10:11:36

标签: wordpress buddypress

如果有新的Buddypress用户注册,我想在bp_core_signup_user电子邮件中添加一些xprofile字段,我发送给网站管理员。我知道我做错了什么?

/* Sends custom pending notification e-mail to WP admin */

function my_pending( $user_id, $user_login, $user_password, $user_email, $usermeta ) {
$field1 = xprofile_get_field_data( 11, $user_id );
$field2 = xprofile_get_field_data( 12, $user_id );
$field3 = xprofile_get_field_data( 4, $user_id );
wp_mail( "example@example.com", $user_login . "bla bla", "bla bla $field1, $field2, $field3" );
}
add_action( 'bp_core_signup_user', 'my_pending', 10, 5 );

0 个答案:

没有答案