Make WordPress Core

Changeset 39886


Ignore:
Timestamp:
01/12/2017 04:56:28 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Users: In wpmu_signup_blog() and wpmu_signup_user(), pass unserialized signup meta data to after_signup_site and after_signup_user filters introduced in [34112], to match the documented value.

Props MaximeCulea.
Fixes #38781.

File:
1 edited

Legend:

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

    r39795 r39886  
    665665 * @param string $user       The user's requested login name.
    666666 * @param string $user_email The user's email address.
    667  * @param array  $meta       By default, contains the requested privacy setting and lang_id.
     667 * @param array  $meta       Optional. Signup meta data. By default, contains the requested privacy setting and lang_id.
    668668 */
    669669function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() )  {
     
    671671
    672672    $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
    673     $meta = serialize($meta);
    674673
    675674    $wpdb->insert( $wpdb->signups, array(
     
    681680        'registered' => current_time('mysql', true),
    682681        'activation_key' => $key,
    683         'meta' => $meta
     682        'meta' => serialize( $meta )
    684683    ) );
    685684
     
    694693     * @param string $user       The user's requested login name.
    695694     * @param string $user_email The user's email address.
    696      * @param string $key        The user's activation key
    697      * @param array  $meta       By default, contains the requested privacy setting and lang_id.
     695     * @param string $key        The user's activation key.
     696     * @param array  $meta       Signup meta data. By default, contains the requested privacy setting and lang_id.
    698697     */
    699698    do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta );
     
    712711 * @param string $user       The user's requested login name.
    713712 * @param string $user_email The user's email address.
    714  * @param array  $meta       By default, this is an empty array.
     713 * @param array  $meta       Optional. Signup meta data. Default empty array.
    715714 */
    716715function wpmu_signup_user( $user, $user_email, $meta = array() ) {
     
    721720    $user_email = sanitize_email( $user_email );
    722721    $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
    723     $meta = serialize($meta);
    724722
    725723    $wpdb->insert( $wpdb->signups, array(
     
    731729        'registered' => current_time('mysql', true),
    732730        'activation_key' => $key,
    733         'meta' => $meta
     731        'meta' => serialize( $meta )
    734732    ) );
    735733
     
    741739     * @param string $user       The user's requested login name.
    742740     * @param string $user_email The user's email address.
    743      * @param string $key        The user's activation key
    744      * @param array  $meta       Additional signup meta. By default, this is an empty array.
     741     * @param string $key        The user's activation key.
     742     * @param array  $meta       Signup meta data. Default empty array.
    745743     */
    746744    do_action( 'after_signup_user', $user, $user_email, $key, $meta );
Note: See TracChangeset for help on using the changeset viewer.