Skip to:
Content

bbPress.org

Changeset 5011


Ignore:
Timestamp:
07/10/2013 04:52:19 AM (12 years ago)
Author:
johnjamesjacoby
Message:

When saving a user's profile, their 'admin_bar_front' setting is accidentally wiped out by edit_user(), because the form field does not exist in bbPress's template parts.

In bbp_edit_user_handler(), check if the user has this setting; if so, add it to the $_POST superglobal to allow edit_user() to function normally.

Fixes #2364. Props imath.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/users/functions.php

    r4996 r5011  
    909909    do_action( $edit_action, $user_id );
    910910
     911    // Prevent edit_user() from wiping out the user's Toolbar on front setting
     912    if ( !isset( $_POST['admin_bar_front'] ) && _get_admin_bar_pref( 'front', $user_id ) ) {
     913        $_POST['admin_bar_front'] = 1;
     914    }
     915
    911916    // Handle user edit
    912917    $edit_user = edit_user( $user_id );
Note: See TracChangeset for help on using the changeset viewer.