@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-buddypress-xprofile-field-types/>
  a sioc:Post ;
  dc:title "Reference Field Types" ;
  dcterms:identifier 154148 ;
  dc:modified "2026-11-09T03:54:27Z"^^xsd:dateTime ;
  dc:created "2026-11-09T03:54:27Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-buddypress-xprofile-field-types/reference-field-types/> ;
  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-buddypress-xprofile-field-types/">LH Buddypress Xprofile Field Types</a></li></ul>
<p class="wp-block-paragraph">Reference fields store a bare integer ID in the xProfile data table and show the target&#8217;s current name, so renames carry through automatically.</p>



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



<ul class="wp-block-list">
<li><strong>Group Reference</strong> (<code>lh_xft-group</code>): stores a BuddyPress group ID. A hidden group&#8217;s name is shown only to its members and to users with <code>bp_moderate</code>.</li>



<li><strong>Member Reference</strong> (<code>lh_xft-member</code>): stores a user ID.</li>
</ul>



<h2 class="wp-block-heading">Text fallback</h2>



<p class="wp-block-paragraph">Each field has an <code>allow_text</code> setting, off by default. When it is on, the field also accepts plain text, for values with no record to point at. A value made up only of digits is always treated as an ID.</p>



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



<p class="wp-block-paragraph">Users with <code>bp_moderate</code> get a search box that looks up groups, or members of the current site. Anyone else sees the current name and cannot change it.</p>



<h2 class="wp-block-heading">Deleted groups and members</h2>



<p class="wp-block-paragraph">Nothing runs when a group or member is deleted. The integer stays in the row and the lookup finds nothing, so the field shows blank. The search box shows empty for a dead reference, so the next save from it clears the value.</p>



<h2 class="wp-block-heading">Account merges</h2>



<p class="wp-block-paragraph">The plugin registers a handler on LH User Identity&#8217;s <code>lh_user_identity_merge_handlers</code> filter. Before the secondary account is deleted, member references to it on every site are repointed to the primary account. A reference on the primary&#8217;s own profile that points at the secondary is removed. The handler does not move the secondary account&#8217;s own profile values.</p>



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



<p class="wp-block-paragraph">The plugin must be network-activated. Calls that use <code>site_id</code> do not load site-activated plugins, so a field type registered by one is refused on those calls.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Buddypress Xprofile Field Types
Reference fields store a bare integer ID in the xProfile data table and show the target&#8217;s current name, so renames carry through automatically.



Types




Group Reference (lh_xft-group): stores a BuddyPress group ID. A hidden group&#8217;s name is shown only to its members and to users with bp_moderate.



Member Reference (lh_xft-member): stores a user ID.




Text fallback



Each field has an allow_text setting, off by default. When it is on, the field also accepts plain text, for values with no record to point at. A value made up only of digits is always treated as an ID.



Editing



Users with bp_moderate get a search box that looks up groups, or members of the current site. Anyone else sees the current name and cannot change it.



Deleted groups and members



Nothing runs when a group or member is deleted. The integer stays in the row and the lookup finds nothing, so the field shows blank. The search box shows empty for a dead reference, so the next save from it clears the value.



Account merges



The plugin registers a handler on LH User Identity&#8217;s lh_user_identity_merge_handlers filter. Before the secondary account is deleted, member references to it on every site are repointed to the primary account. A reference on the primary&#8217;s own profile that points at the secondary is removed. The handler does not move the secondary account&#8217;s own profile values.



Activation



The plugin must be network-activated. Calls that use site_id do not load site-activated plugins, so a field type registered by one is refused on those calls.
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1>, <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261108t165300-reference-field-types> .

<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> .
<https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261108t165300-reference-field-types> rdfs:seeAlso <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261108t165300-reference-field-types&feed=lhrdf&format=turtle> .
