diff --git bp-members/bp-members-functions.php bp-members/bp-members-functions.php
index a259d0a..72634cb 100644
|
|
|
function bp_core_get_user_domain( $user_id, $user_nicename = false, $user_login |
| 131 | 131 | * |
| 132 | 132 | * @package BuddyPress Core |
| 133 | 133 | * @param user_id The ID of the user. |
| | 134 | * @param $skip_cache True if you want to skip the WP cache check |
| 134 | 135 | * @uses BP_Core_User::get_core_userdata() Performs the query. |
| 135 | 136 | */ |
| 136 | | function bp_core_get_core_userdata( $user_id ) { |
| | 137 | function bp_core_get_core_userdata( $user_id, $skip_cache = false ) { |
| 137 | 138 | if ( empty( $user_id ) ) |
| 138 | 139 | return false; |
| 139 | 140 | |
| 140 | | if ( !$userdata = wp_cache_get( 'bp_core_userdata_' . $user_id, 'bp' ) ) { |
| | 141 | if ( !$skip_cache ) { |
| | 142 | $userdata = wp_cache_get( 'bp_core_userdata_' . $user_id, 'bp' ); |
| | 143 | } |
| | 144 | |
| | 145 | if ( !$userdata ) { |
| 141 | 146 | $userdata = BP_Core_User::get_core_userdata( $user_id ); |
| 142 | 147 | wp_cache_set( 'bp_core_userdata_' . $user_id, $userdata, 'bp' ); |
| 143 | 148 | } |
diff --git bp-settings/bp-settings-actions.php bp-settings/bp-settings-actions.php
index 7b4756b..f26a01e 100644
|
|
|
function bp_core_screen_general_settings() { |
| 24 | 24 | if ( is_super_admin() || ( !empty( $_POST['pwd'] ) && $_POST['pwd'] != '' && wp_check_password( $_POST['pwd'], $bp->displayed_user->userdata->user_pass, $bp->displayed_user->id ) ) ) { |
| 25 | 25 | |
| 26 | 26 | $update_user = get_userdata( $bp->displayed_user->id ); |
| | 27 | |
| | 28 | // The structure of the $update_user object changed in WP 3.3, but |
| | 29 | // wp_update_user() still expects the old format |
| | 30 | if ( isset( $update_user->data ) && is_object( $update_user->data ) ) { |
| | 31 | $update_user = $update_user->data; |
| | 32 | } |
| 27 | 33 | |
| 28 | 34 | // Make sure changing an email address does not already exist |
| 29 | 35 | if ( $_POST['email'] != '' ) { |
| … |
… |
function bp_core_screen_general_settings() { |
| 80 | 86 | unset( $update_user->user_pass ); |
| 81 | 87 | } |
| 82 | 88 | |
| 83 | | // The structure of the $update_user object changed in WP 3.3, but |
| 84 | | // wp_update_user() still expects the old format |
| 85 | | if ( isset( $update_user->data ) && is_object( $update_user->data ) ) { |
| 86 | | $update_user = $update_user->data; |
| 87 | | } |
| 88 | | |
| 89 | 89 | // Make sure these changes are in $bp for the current page load |
| 90 | 90 | if ( ( false === $email_error ) && ( false === $pass_error ) && ( wp_update_user( get_object_vars( $update_user ) ) ) ) { |
| 91 | | $bp->displayed_user->userdata = bp_core_get_core_userdata( $bp->displayed_user->id ); |
| | 91 | $bp->displayed_user->userdata = bp_core_get_core_userdata( $bp->displayed_user->id, true ); |
| 92 | 92 | $bp_settings_updated = true; |
| 93 | 93 | } |
| 94 | 94 | |