diff --git bp-settings/bp-settings-actions.php bp-settings/bp-settings-actions.php
index 7b4756b..dfed712 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 ); |
| 92 | 91 | $bp_settings_updated = true; |
| 93 | 92 | } |
| 94 | 93 | |
| … |
… |
function bp_core_screen_general_settings() { |
| 112 | 111 | |
| 113 | 112 | // Execute additional code |
| 114 | 113 | do_action( 'bp_core_general_settings_after_save' ); |
| | 114 | |
| | 115 | bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_settings_slug() . '/general' ) ); |
| 115 | 116 | } |
| 116 | 117 | |
| 117 | 118 | // Load the template |