Ticket #4991: 4999.01.patch
File 4999.01.patch, 1.0 KB (added by , 11 years ago) |
---|
-
bp-xprofile/bp-xprofile-screens.php
function xprofile_screen_display_profile() { 37 37 */ 38 38 function xprofile_screen_edit_profile() { 39 39 40 if ( !bp_is_my_profile() && !bp_current_user_can( 'bp_moderate' ) ) 40 // Bail if not the correct screen or if the current user cannot edit this 41 // user's settings 42 if ( ! bp_is_my_profile() && ! bp_core_can_edit_settings() ) { 41 43 return false; 44 } 42 45 43 46 $bp = buddypress(); 44 47 … … function xprofile_screen_edit_profile() { 149 152 */ 150 153 function xprofile_screen_change_avatar() { 151 154 152 // Bail if not the correct screen 153 if ( !bp_is_my_profile() && !bp_current_user_can( 'bp_moderate' ) ) 155 // Bail if not the correct screen or if the current user cannot edit this 156 // user's settings 157 if ( ! bp_is_my_profile() && ! bp_core_can_edit_settings() ) { 154 158 return false; 159 } 155 160 156 161 // Bail if there are action variables 157 162 if ( bp_action_variables() ) {