Creating a profile field that only admin can edit
For our site, we want to designate certain users as being special. That the user is special should appear in their profile, but only the site admin can designate a user as being special.
In an attempt to implement this behavior, I:
- added a field to the profile
- made the field available to all user types
- hid the field if the email field is not empty, i.e., it is hidden for all users
I then looked up the field_id in the table wp_bp_xprofile_fields for the newly created field, then added a row to the table wp_bp_xprofile_data using this field_id for each special user.
And this worked just fine, until…
One of the special users updated their profile. When this happened, my manually entered row in wp_bp_xprofile_data disappeared. I then conformed that updating the profile causes the entry to disappear – it does.
Question: Since my approach is not working, what is the proper way to achieve the desired goal?
- You must be logged in to reply to this topic.