Changeset 13798 for trunk/src/bp-members/bp-members-functions.php
- Timestamp:
- 04/21/2024 06:37:13 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-functions.php
r13743 r13798 1859 1859 $user_email = sanitize_email( $user_email ); 1860 1860 $activation_key = wp_generate_password( 32, false ); 1861 $create_user = false; 1862 1863 // @deprecated. 1864 if ( defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) ) { 1865 _doing_it_wrong( 'BP_SIGNUPS_SKIP_USER_CREATION', esc_html__( 'the `BP_SIGNUPS_SKIP_USER_CREATION` constant is deprecated as skipping user creation is now the default behavior.', 'buddypress' ), 'BuddyPress 14.0.0' ); 1866 1867 // Creating a user is the opposite of skipping user creation. 1868 $create_user = ! BP_SIGNUPS_SKIP_USER_CREATION; 1869 } 1861 1870 1862 1871 /** 1863 * WordPress's default behavior is to create user accounts 1864 * immediately at registration time. BuddyPress uses a system 1865 * borrowed from WordPress Multisite, where signups are stored 1866 * separately and accounts are only created at the time of 1867 * activation. For backward compatibility with plugins that may 1868 * be anticipating WP's default behavior, BP silently creates 1869 * accounts for registrations (though it does not use them). If 1870 * you know that you are not running any plugins dependent on 1871 * these pending accounts, you may want to save a little DB 1872 * clutter by defining setting the BP_SIGNUPS_SKIP_USER_CREATION 1873 * to true in your wp-config.php file. 1872 * Filter here to keep creating a user when a registration is performed on regular WordPress configs. 1873 * 1874 * @since 14.0.0 1875 * @todo Fully deprecate in 15.0.0 1876 * 1877 * @param boolean $create_user True to carry on creating a user when a registration is performed. 1878 * False otherwise. 1874 1879 */ 1875 if ( ! defined( 'BP_SIGNUPS_SKIP_USER_CREATION' ) || ! BP_SIGNUPS_SKIP_USER_CREATION) {1880 if ( apply_filters( 'bp_signups_create_user', $create_user ) ) { 1876 1881 $user_id = BP_Signup::add_backcompat( $user_login, $user_password, $user_email, $usermeta ); 1877 1882 … … 2018 2023 $user_id = wp_create_user( $signup->user_login, $password, $signup->user_email ); 2019 2024 2020 // Otherwise, update the existing user's status. 2025 /* 2026 * @todo Remove this `elseif` statement in version 15.0.0. 2027 * 2028 * Since 2.0.0 BuddyPress is using the $wpdb->signups table even in regular WordPress configs. 2029 * In 14.0.0, we are deprecating the `BP_SIGNUPS_SKIP_USER_CREATION` as well as creating a user 2030 * each time a registration is performed. 2031 */ 2021 2032 } elseif ( $key === bp_get_user_meta( $user_id, 'activation_key', true ) || $key === wp_hash( $user_id ) ) { 2022 2033
Note: See TracChangeset
for help on using the changeset viewer.