Skip to:
Content

bbPress.org

Changeset 7289


Ignore:
Timestamp:
02/26/2025 06:11:44 PM (4 months ago)
Author:
johnjamesjacoby
Message:

Users: bail early out of profile-update if also during user sign-up.

This change ensures that the bbp_profile_update_role() function does not unintentionally run during user registration.

Props mungah, h1-2999394.

In trunk, for 2.7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/capabilities.php

    r7086 r7289  
    273273 */
    274274function bbp_profile_update_role( $user_id = 0 ) {
     275
     276    // Bail if doing user registration actions
     277    if ( doing_action( 'bbp_user_register' ) || doing_action( 'register_new_user' ) ) {
     278        return;
     279    }
    275280
    276281    // Bail if no user ID was passed
Note: See TracChangeset for help on using the changeset viewer.