diff --git bp-members/bp-members-functions.php bp-members/bp-members-functions.php
index 2158c2f..3e2b4b6 100644
|
|
function bp_core_validate_blog_signup( $blog_url, $blog_title ) { |
1434 | 1434 | } |
1435 | 1435 | |
1436 | 1436 | function bp_core_signup_user( $user_login, $user_password, $user_email, $usermeta ) { |
1437 | | global $bp; |
| 1437 | global $bp, $wpdb; |
1438 | 1438 | |
1439 | | // We need to cast $user_id to pass to the filters |
1440 | | $user_id = false; |
| 1439 | // We need to cast $user_id & $signup_id to pass to the filters |
| 1440 | $user_id = $signup_id = false; |
1441 | 1441 | |
1442 | 1442 | // Multisite installs have their own install procedure |
1443 | 1443 | if ( is_multisite() ) { |
1444 | 1444 | wpmu_signup_user( $user_login, $user_email, $usermeta ); |
1445 | 1445 | |
| 1446 | if ( ! empty( $wpdb->insert_id ) ) { |
| 1447 | $signup_id = $wpdb->insert_id; |
| 1448 | } |
| 1449 | |
1446 | 1450 | } else { |
1447 | 1451 | // Format data |
1448 | 1452 | $user_login = preg_replace( '/\s+/', '', sanitize_user( $user_login, true ) ); |
… |
… |
function bp_core_signup_user( $user_login, $user_password, $user_email, $usermet |
1480 | 1484 | 'meta' => $usermeta, |
1481 | 1485 | ); |
1482 | 1486 | |
1483 | | BP_Signup::add( $args ); |
| 1487 | $signup_id = BP_Signup::add( $args ); |
1484 | 1488 | |
1485 | 1489 | if ( apply_filters( 'bp_core_signup_send_activation_key', true ) ) { |
1486 | 1490 | bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key ); |
… |
… |
function bp_core_signup_user( $user_login, $user_password, $user_email, $usermet |
1489 | 1493 | |
1490 | 1494 | $bp->signup->username = $user_login; |
1491 | 1495 | |
1492 | | do_action( 'bp_core_signup_user', $user_id, $user_login, $user_password, $user_email, $usermeta ); |
| 1496 | do_action( 'bp_core_signup_user', $user_id, $user_login, $user_password, $user_email, $usermeta, $signup_id ); |
1493 | 1497 | |
1494 | 1498 | return $user_id; |
1495 | 1499 | } |