Skip to:
Content

bbPress.org

Ticket #2364: 2364-option1.diff

File 2364-option1.diff, 762 bytes (added by imath, 8 years ago)
  • includes/users/functions.php

     
    907907        // Do action based on who's profile you're editing
    908908        $edit_action = bbp_is_user_home_edit() ? 'personal_options_update' : 'edit_user_profile_update';
    909909        do_action( $edit_action, $user_id );
     910       
     911        // Eventually simulates a new $_POST var to maintain WP Admin Bar on front if user meta is set
     912        if( empty( $_POST['admin_bar_front'] ) ) {
     913                $show_admin_bar =  _get_admin_bar_pref( 'front', $user_id );
    910914
     915                if( !empty( $show_admin_bar ) )
     916                        $_POST['admin_bar_front'] = 1;
     917        }
     918
    911919        // Handle user edit
    912920        $edit_user = edit_user( $user_id );
    913921