Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/21/2024 06:37:13 AM (12 months ago)
Author:
imath
Message:

Stop creating a user when a signup is performed on regular WP configs

Since version 2.0, we are using the $wpdb->signups table to manage pending accounts. We kept on creating a user as well as a user meta to store the activation key for regular WP configs.

This user creation step is now deprecated and by default no user will be created on any WordPress config once a user signs up. In next BP major version we'll fully remove the code but until then you can always use the bp_signups_create_user filter (returning true) or define the deprecated constant BP_SIGNUPS_SKIP_USER_CREATION to false to carry on creating the user on regular WP configs.

This move allows us to fix a 9 years old ticket and is more consistent: signups are becoming users only when they validate their account.

Props johnjamesjacoby, DJPaul, espellcaste

Fixes #6123
Closes https://github.com/buddypress/buddypress/pull/271

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-signup.php

    r13499 r13798  
    534534     *
    535535     * @since 2.0.0
     536     * @deprecated 14.0.0
    536537     *
    537538     * @global wpdb $wpdb The WordPress database object.
     
    544545     */
    545546    public static function add_backcompat( $user_login = '', $user_password = '', $user_email = '', $usermeta = array() ) {
     547        _deprecated_function( __METHOD__, '14.0.0' );
     548
    546549        global $wpdb;
    547550
     
    604607         *
    605608         * @since 10.0.0
     609         * @deprecated 14.0.0
    606610         *
    607611         * @param int $user_id ID of the WP_User just added.
    608612         */
    609         do_action( 'bp_core_signups_after_add_backcompat', $user_id );
     613        do_action_deprecated( 'bp_core_signups_after_add_backcompat', array( $user_id ), '14.0.0' );
    610614
    611615        /**
     
    613617         *
    614618         * @since 2.0.0
     619         * @deprecated 14.0.0
    615620         *
    616621         * @param int $user_id User ID being registered.
    617622         */
    618         return apply_filters( 'bp_core_signups_add_backcompat', $user_id );
     623        return apply_filters_deprecated( 'bp_core_signups_add_backcompat', array( $user_id ), '14.0.0' );
    619624    }
    620625
Note: See TracChangeset for help on using the changeset viewer.