[buddypress-trac] [BuddyPress Trac] #8976: Registration through REST API with additional profile fields

buddypress-trac noreply at wordpress.org
Wed Apr 24 11:14:03 UTC 2024


#8976: Registration through REST API with additional profile fields
--------------------------------------+--------------------------
 Reporter:  niftythree                |       Owner:  espellcaste
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  14.0.0
Component:  REST API                  |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |
--------------------------------------+--------------------------

Comment (by niftythree):

 Hi @espellcaste,

 Thanks for your reply. Can you try the following:

 1. Create additional fields through WordPress Dashboard > Users > Profile
 Fields > Add New Field > Add "Travelling" as the Name and set Type to
 "Checkboxes".
         a. Set your checkbox options to > Check "Use this field in the
 site registration form." > Save:
                 * I never travel
                 * Always
                 * Sometimes
         b. Create another profile field > Add "Info about me" as the Name
 and set Type to Text Box > Check "Use this field in the site registration
 form." > Save
         c. Create another profile field > Add "Language" as the Name and
 set Type to Multi Select Box > Check "Use this field in the site
 registration form."
                 i. Set your Multi Select Box options and Save:
                 * Arabic
                 * English
                 * Dutch
         d. Rearrange the fields in the WordPress Dashboard > Users >
 Profile Fields area. Position "Language" at the top, "Travelling" second
 and "Info about me" at the bottom.
                 i. Rearrange the fields in the "Signup Fields" group the
 same way. "Language" at the top, "Travelling" second and "Info about me"
 at the bottom.

 2. Register an account through the REST API with profile fields as ordered
 below (i.e. different to the ordering within the Signup Fields group):
         a. Send back "Travelling" profile field options in the order of:
                 * "Sometimes, I never travel"
         b. "Info about me" profile field sent back as:
                 * "This is some text for my profile."
         c. Send back "Language" profile field options in the order of:
                 * "Arabic, English"

 3. Check WordPress Dashboard > Users > Manage Signups > Click on newly
 registered pending account
         a. The order of the profile fields are different
         b. Checkbox and multi select box selections are arranged in the
 order they were sent, and not in the sort order set for the profile field.
 NB: we now know that this happens regardless of the sort order type that's
 chosen, and not just for Custom.
                 i. Once the account is activated, the profile field order
 displays correctly on the website, but the field options do not display in
 the sort order. The REST API also responds in the same way (for example,
 in /members and /members/me).

 Further information:
         * The above occurs when using a Checkbox or Multi Select Box.
         * The more profile fields and options within them you have, the
 easier it is to notice.
         * Existing activated users: Updating profile field options for a
 checkbox/multi select box through the REST API will also save/display in
 the order they were sent, and not in the sort order set for the profile
 field.
         * When the website is used, it conforms to all sort orders,
 including "Custom", when registering and editing a profile.

 Thanks.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8976#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list