Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#4456 closed defect (bug) (fixed)

BP_XProfile_Group->get() does not return default field visibility on register.php

Reported by: drkane Owned by:
Milestone: 1.7 Priority: normal
Severity: normal Version: 1.6
Component: Extended Profile Keywords:
Cc:

Description

When a user is presented with the registration form through register.php, the "this field can be seen by:" label always reads "Anyone" no matter what the field visibility setting is.

This is because when the field settings are found through the BP_XProfile_Group class's "get" function, the default field visibility variable is not fetched. This is because the user_id of the displayed user is set to 0 (as there is no displayed user in this case), so

if ( ! empty( $fetch_field_data ) && ! empty( $user_id ) )

(on line 178) is false, and the command to fetch field visibility is not triggered.

My quick fix was to remove the check on user_id in the if statement, but presumably this is needed for other uses of this function.

Change History (2)

#1 @boonebgorges
8 years ago

  • Milestone changed from Awaiting Review to 1.6.2

Thanks for the report and diagnosis. I'm moving to the next bugfix milestone for further review.

#2 @johnjamesjacoby
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6610]) Allow profile field visibility to work when viewing register page. Fixes #4456.

Note: See TracTickets for help on using tickets.