Opened 12 years ago
Closed 12 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.
Thanks for the report and diagnosis. I'm moving to the next bugfix milestone for further review.