WordPress.org

Make WordPress Core

Changeset 23535


Ignore:
Timestamp:
02/28/2013 08:28:36 PM (5 years ago)
Author:
nacin
Message:

Remove direct call to add_new_user_to_blog() as this is already hooked into wpmu_activate_user.

The second argument passed by that hook is not $email, so let's change that. It is not used.

props wonderboymusic.
fixes #15173.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r23511 r23535  
    812812 * @uses wpmu_welcome_user_notification()
    813813 * @uses add_user_to_blog()
    814  * @uses add_new_user_to_blog()
    815814 * @uses wpmu_create_user()
    816815 * @uses wpmu_create_blog()
     
    858857            return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
    859858
    860         wpmu_welcome_user_notification($user_id, $password, $meta);
    861 
    862         add_new_user_to_blog( $user_id, $user_email, $meta );
    863         do_action('wpmu_activate_user', $user_id, $password, $meta);
    864         return array('user_id' => $user_id, 'password' => $password, 'meta' => $meta);
     859        wpmu_welcome_user_notification( $user_id, $password, $meta );
     860        do_action( 'wpmu_activate_user', $user_id, $password, $meta );
     861        return array( 'user_id' => $user_id, 'password' => $password, 'meta' => $meta );
    865862    }
    866863
     
    16781675 * Add a newly created user to the appropriate blog
    16791676 *
    1680  * @since MU
     1677 * To add a user in general, use add_user_to_blog(). This function
     1678 * is specifically hooked into the wpmu_activate_user action.
     1679 *
     1680 * @since MU
     1681 * @see add_user_to_blog()
    16811682 *
    16821683 * @param int $user_id
    1683  * @param string $email
     1684 * @param mixed $password Ignored.
    16841685 * @param array $meta
    16851686 */
    1686 function add_new_user_to_blog( $user_id, $email, $meta ) {
     1687function add_new_user_to_blog( $user_id, $password, $meta ) {
    16871688    global $current_site;
    16881689    if ( !empty( $meta[ 'add_to_blog' ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.