[buddypress-trac] [BuddyPress Trac] #8042: visibility options for Name field appear on registration page
buddypress-trac
noreply at wordpress.org
Thu Jan 31 08:01:27 UTC 2019
#8042: visibility options for Name field appear on registration page
--------------------------+------------------------------
Reporter: msteimann | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: Awaiting Review
Component: Registration | Version: 4.1.0
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+------------------------------
Comment (by msteimann):
Replying to [comment:2 Venutius]:
> I've found that this is happening because the function
`get_allow_custom_visibility` in `buddypress/bp-xprofile/classes/class-bp-
profile-field` is defaulting to `allow` for all profile fields where the
visibility has not been specifically disabled. this is appropriate for all
profile fields except `Name` where it should be disabled even if it is not
set. my proposed fix is to change line 833 as follows:
>
> `if ( 'disabled' === $allow_custom_visibility || 1 === $this->id ) {`
>
> This adds an extra check to ensure the `Name` field returns as disabled,
thus fixing the issue with the registration form.
Thank you, works like a charm! Regards, Martin
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8042#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list