@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-membership/>
  a sioc:Post ;
  dc:title "Required details" ;
  dcterms:identifier 152688 ;
  dc:modified "2026-10-28T16:08:04Z"^^xsd:dateTime ;
  dc:created "2026-10-28T11:34:18Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-membership/required-details/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-membership/">LH Membership</a></li></ul>
<p class="wp-block-paragraph">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.</p>



<h2 class="wp-block-heading">What counts as required</h2>



<ul class="wp-block-list">
<li>Given name and surname.</li>



<li>Every field marked <strong>required</strong> in the site&#8217;s onboarding xProfile group, the group chosen in the LH Membership settings. To change an organisation&#8217;s requirements, tick or untick Required on its fields under Users &gt; Profile Fields.</li>
</ul>



<h2 class="wp-block-heading">How a value is found</h2>



<p class="wp-block-paragraph">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:</p>



<ol class="wp-block-list">
<li><code>xprofile_get_field_data()</code>, which also covers field types that redirect it (LH Profile Page&#8217;s phone, address, gender and birthdate).</li>



<li>The field type&#8217;s <code>wp_user_key</code>, BuddyPress&#8217;s own user-meta storage for types extending <code>BP_XProfile_Field_Type_WordPress</code>.</li>



<li>User meta, or a site-specific user option, named after the field type, the convention LocalHero&#8217;s custom field types follow (e.g. <code>lh_uet-text</code> for Touch Experience).</li>



<li>The <code>lh_membership_required_field_has_value</code> filter, which has the final say for anything stored elsewhere, such as a taxonomy.</li>
</ol>



<h2 class="wp-block-heading">Where it is enforced</h2>



<ul class="wp-block-list">
<li><strong>Required Info (Confirm Details).</strong> Saving only records the user as having confirmed their details once every required value is stored; otherwise it lists what is still missing.</li>



<li><strong>The accept form.</strong> The T&amp;Cs accept form is shown only to users who have confirmed their details and are missing nothing. Everyone else gets a link back to Required Info.</li>



<li><strong>Recording consent.</strong> On the server, an acceptance from anyone still missing a detail is refused and they are redirected to Required Info, whatever page the post came from. This stops a stale or replayed page, or a direct post, from recording consent.</li>
</ul>



<p class="wp-block-paragraph">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.</p>



<h2 class="wp-block-heading">Hooks</h2>



<ul class="wp-block-list">
<li><code>lh_membership_missing_required_details</code> ( array $missing, int $user_id ): the missing details, keyed, with readable labels. Add or remove entries to change the requirements in code, for example a club&#8217;s team choice.</li>



<li><code>lh_membership_required_field_has_value</code> ( bool $has_value, BP_XProfile_Field $field, int $user_id ): whether a required field has a value, for storage the checks above do not cover.</li>



<li><code>lh_membership-user_consent-accept_refused</code> ( int $user_id, array $missing ): fires when an acceptance is refused.</li>
</ul>



<p class="wp-block-paragraph">The check itself is <code>LH_Membership_confirm_details_class::get_missing_required_details( $user_id )</code>, which returns an empty array when the user is complete. (Since 2.97.0; user-meta storage since 2.97.1.)</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Membership
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




Given name and surname.



Every field marked required in the site&#8217;s onboarding xProfile group, the group chosen in the LH Membership settings. To change an organisation&#8217;s requirements, tick or untick Required on its fields under Users &gt; Profile Fields.




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:




xprofile_get_field_data(), which also covers field types that redirect it (LH Profile Page&#8217;s phone, address, gender and birthdate).



The field type&#8217;s wp_user_key, BuddyPress&#8217;s own user-meta storage for types extending BP_XProfile_Field_Type_WordPress.



User meta, or a site-specific user option, named after the field type, the convention LocalHero&#8217;s custom field types follow (e.g. lh_uet-text for Touch Experience).



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




Required Info (Confirm Details). Saving only records the user as having confirmed their details once every required value is stored; otherwise it lists what is still missing.



The accept form. The T&amp;Cs accept form is shown only to users who have confirmed their details and are missing nothing. Everyone else gets a link back to Required Info.



Recording consent. On the server, an acceptance from anyone still missing a detail is refused and they are redirected to Required Info, whatever page the post came from. This stops a stale or replayed page, or a direct post, from recording consent.




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




lh_membership_missing_required_details ( array $missing, int $user_id ): the missing details, keyed, with readable labels. Add or remove entries to change the requirements in code, for example a club&#8217;s team choice.



lh_membership_required_field_has_value ( bool $has_value, BP_XProfile_Field $field, int $user_id ): whether a required field has a value, for storage the checks above do not cover.



lh_membership-user_consent-accept_refused ( int $user_id, array $missing ): fires when an acceptance is refused.




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.)
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
