Required details

Before someone can accept the terms and apply for membership, LH Membership checks that their required details are actually stored. Each organisation decides what is required, without code.

What counts as required

How a value is found

Many field types keep their value in user meta rather than the xProfile table, so a field counts as filled if any of these has a value, checked in order:

  1. xprofile_get_field_data(), which also covers field types that redirect it (LH Profile Page’s phone, address, gender and birthdate).
  2. The field type’s wp_user_key, BuddyPress’s own user-meta storage for types extending BP_XProfile_Field_Type_WordPress.
  3. User meta, or a site-specific user option, named after the field type, the convention LocalHero’s custom field types follow (e.g. lh_uet-text for Touch Experience).
  4. The lh_membership_required_field_has_value filter, which has the final say for anything stored elsewhere, such as a taxonomy.

Where it is enforced

An administrator approving an application in wp-admin is not affected. Users who accepted before 2.97.0 with details missing are left as they are.

Hooks

The check itself is LH_Membership_confirm_details_class::get_missing_required_details( $user_id ), which returns an empty array when the user is complete. (Since 2.97.0; user-meta storage since 2.97.1.)