function user_delete_button() { global $user; if (bb_current_user_can('edit_users') && bb_get_current_user_info('id') != (int) $user->ID) { echo apply_filters('user_delete_button', get_user_delete_button()); } }
function user_delete_button() { global $user; $user_obj = new BP_User($user->ID); if (!bb_current_user_can('keep_gate') && 'keymaster' == $user_obj->roles[0]) { return; } if (bb_current_user_can('edit_users') && bb_get_current_user_info('id') != (int) $user->ID) { echo apply_filters('user_delete_button', get_user_delete_button()); } }