Digital Sovereignty for everyone

Reference Field Types

Reference fields store a bare integer ID in the xProfile data table and show the target’s current name, so renames carry through automatically.

Types

  • Group Reference (lh_xft-group): stores a BuddyPress group ID. A hidden group’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’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’s own profile that points at the secondary is removed. The handler does not move the secondary account’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.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.