Opened 14 years ago
Closed 14 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.7 |
| Component: | Extended Profile | Version: | 1.6 |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report and diagnosis. I'm moving to the next bugfix milestone for further review.