- 3.32.0: Profile fields now show in LH User Insights as well as the original Users Insights, the two running in parallel. Phone, Secondary Phone, Street Address, Town, Postcode, State or province, Gender and Birthdate are registered on LH User Insights’ lh_ui_fields, lh_ui_db_map and lh_ui_query_join_table hooks with the same callbacks used for Users Insights, so both read the same sources: the phone tables for phone numbers, LH Addresses for the address, and user meta for gender and birthdate.
- 3.31.0: The Phone and Secondary Phone columns and filters in Users Insights now read LH Phone Numbers’ tables instead of the retired lh_profile-phone and lh_profile-secondary_phone meta, which stopped being updated on 21 Nov 2026. Phone is a user’s first current number and Secondary Phone their second, primary first and then oldest, the same order the profile fields use. Values are E.164. If the phone tables are not installed the columns are empty rather than breaking the Users Insights query.
- 3.30.4: Stops registering the legacy lh_profile-phone and lh_profile-secondary_phone user meta (register_meta_fields and its sanitize_registered_meta callback). LH Phone Numbers is the only store for phone numbers and no longer watches that meta, so the registration had nothing left to do.
- 3.30.3: search-users: the email filter now also matches verified email aliases from LH User Identity, so a member is found by any address that signs in to their account (for example one added with add-email-alias or kept from a merged account). The match is partial, like the account email, and sits in the same OR group, so match_mode behaves as before. Unverified aliases are not matched. Without LH User Identity, email matches the account email only. The ability and email parameter descriptions say so.
- 3.30.2: Elies, Tana and Tarun are now on the first-name gender helper’s ambiguous list, so they never get a gender suggestion. The dictionary reads each as one gender, but each is used for both or is too uncertain to guess: Elies is usually a woman’s name but was a man’s at Princes Park Touch, Tana is used for both across the Pacific, and Tarun was deliberately left blank.
- 3.30.1: The first-name gender helper again requires British and US name data to agree before it suggests a gender from the dictionary. Without that check, names the dictionary only half-knows were given a gender: Elies and Jann became Male, and Laurie became Female. Names on the known list, such as Tilly and Rowan, still get their listed gender without the check, so they are not dropped. lh_profile_return_gender_check_countries defaults to GB and US again.
- 3.30.0: Filling an existing user no longer adds them to the site doing the fill. create-or-fill-user and bulk-create-or-fill-users leave an existing user’s site membership alone unless the new add_to_site input is true. Bulk takes add_to_site for the whole batch, and an entry’s own value wins. Without it the site result is not_on_site or no_role, and bulk leaves those out of its compact result. A new user is still always added to the current site. This needs LH User Provisioning 1.5.0. The first-name gender helper now has a known-names list of clearly gendered names the dictionary misses or hedges, such as Tilly and Rowan. The list can be changed with the lh_profile_return_known_first_names filter. Rowan is off the ambiguous list. The helper no longer requires British and US data to agree, because that rule dropped common Australian names; lh_profile_return_gender_check_countries now defaults to none.
- 3.29.1: Fixes delete-unclaimed-user failing on every call: it read the BuddyPress invitations table through a method BuddyPress does not make public. It now uses the table BuddyPress registers, and skips the invitation checks when there is none.
- 3.29.0: New delete-unclaimed-user MCP ability: deletes, network-wide, an account that was created automatically (lh-messaging, lh-email or lh_crm provenance) and never claimed, such as one email ingestion made for a spam sender. Previewed with a confirm_token, then applied. Refused unless every check passes: unclaimed role only on every site, an allowed provenance source, not a super admin or the caller, no BuddyPress group memberships, membership requests, friendships or activity, no WooCommerce orders, no posts and no linked phone numbers, and no messages sent or authored other than ones flagged as spam. Checks and allowed sources are filterable (lh_profile_return_unclaimed_delete_checks, lh_profile_return_unclaimed_delete_sources). On apply the user’s spam messages are deleted, mail sent to them is kept but unlinked, pending group invitations are removed, the deletion is recorded in the audit trail and the lh_profile_unclaimed_user_deleted action fires. Requires install_plugins.
- 3.28.2: Roles that WordPress plugins hand out on their own no longer count as claiming an account. bbPress gives every user its default forum role (bbp_participant), so every unclaimed account looked claimed, and update-user-profile, sync-display-name and LH Email’s profile enrichment refused them all. The roles that don’t count come from the new filterable return_unclaiming_roles() (lh_profile_page_return_unclaiming_roles), by default bbPress’s bbp_participant and bbp_spectator. A moderator or keymaster role still counts as claimed.
- 3.28.1: Moved LH_Profile_First_Name_Gender to includes/class-lh-profile-first-name-gender.php, following WordPress class file naming, and added its file and class docblocks. Its behaviour is unchanged.
- 3.28.0: Added a shared, conservative first-name gender lookup, LH_Profile_First_Name_Gender::suggest( $first_name ), for any plugin that infers gender from a name (email ingestion, imports). It returns Male or Female only when the bundled gender-detector data reads the name as strictly that gender both globally and for every check country (GB and US by default), and an empty string otherwise. Names that can go either way, such as Alex, Jordan, Kai, Jess, Marian and Ashley, never get a suggestion. The list comes from return_ambiguous_first_names() and is filterable via lh_profile_return_ambiguous_first_names; the check countries are filterable via lh_profile_return_gender_check_countries. It never suggests Organisation or Robot, and it never writes anything.
- 3.27.0: Added the lh-profile-page/bulk-create-or-fill-users MCP ability: create-or-fill-user for up to 100 users per call (filterable via lh_profile_bulk_create_or_fill_users_return_max_users), with the same per-user arguments and fill-only rules. dry_run (default true) and an optional existing_user default are set once for the batch; repeated emails in a batch are not run and one failing entry never stops the rest. The result is compact: counts by action, then per user only what was filled, rejected or failed, plus site, group and display_name_stale when relevant. Requires promote_users, as the single ability. create-or-fill-user’s per-user input schema now comes from LH_Profile_Create_Or_Fill_User_Ability::return_user_properties(), shared by both abilities, and its description points to the bulk ability.
- 3.26.3: create-or-fill-user now treats a first or last name that is an email address or the login as empty, the same placeholder test it already uses for the nickname and display name. Accounts created by email ingestion, which store the email address as the first name, can now have their real name filled without overwriting a real name.
- 3.26.2: Prepares for LH Addresses no longer mirroring addresses into the lh_profile-* meta. LH Contacts no longer watches the address meta keys for card changes: it follows LH Addresses’ own events from LH Contacts 0.6.0. create-or-fill-user reports an address part as filled when LH Addresses accepts the address, instead of reading back the meta.
- 3.26.1: Address reads no longer check whether LH Addresses is loaded, since it is now required. Profile field reads (return_user_meta) and the Users Insights address columns use LH Addresses directly. search-users always searches the street address, town, postcode, state and country in LH Addresses and never in the meta: while its tables are not at their current schema, those filters match no one rather than returning stale meta matches.
- 3.26.0: LH Addresses is now a required plugin. Requires Plugins lists lh-addresses alongside lh-phone-numbers, and the profile field saver and fill-fields (create-or-fill-user) always store address parts through LH Addresses. The fallbacks that wrote the address meta directly when LH Addresses was missing are removed. The lh_profile-* address meta is still mirrored by LH Addresses for now.
- 3.25.1: Users Insights now reads the street address, town, postcode and state from LH Addresses (0.10.0 or later) instead of the meta, for its columns, filters and sorting. The state shows as its code (VIC).
- 3.25.0: search-users now searches the country, state, town, postcode and street address in LH Addresses (0.9.0 or later) instead of the meta, combined with the other fields like phone. A country or state can be searched by name or code: Victoria and VIC, Australia and AU, all match.
- 3.24.3: search-users now returns each member’s address from LH Addresses: the state can come back as its code (VIC) and the country as its English name. The address search filters still match against the address meta, which LH Addresses keeps in step.
- 3.24.2: BuddyPress profile views, the xProfile data export and LH Contacts cards now read the address from LH Addresses through LH_Profile_Phone_Field::return_user_meta(). This also fixes xProfile phone fields, which had been showing the old phone meta, no longer kept up to date since 3.21.0, instead of the number in LH Phone Numbers.
- 3.24.1: The street address, town, postcode, state and country inputs now show the member’s address from LH Addresses (through LH_Profile_Phone_Field::return_user_meta()), and their values are escaped with esc_attr().
- 3.24.0: Profile address fields are now read from LH Addresses: LH_Profile_Phone_Field::return_user_meta() answers the street, town, postcode, state and country keys from the member’s own residential address (LH Addresses 0.8.0 or later), falling back to the meta. This moves the fill-if-empty checks, the CRM, check-ins and reports integrations and the update-user-profile current values onto the tables. The state may now show as its code (VIC) and the country as its English name.
- 3.23.0: Filling a user’s address (create-or-fill-user) now stores it through LH Addresses: the parts being filled are saved together as the member’s own address, and clubs they belong to are given it, then copied into the profile fields. Each part is still reported as filled only once it reads back correctly. The fill rule is unchanged: the address is filled only when it is empty.
- 3.22.0: Profile address fields are now saved through LH Addresses: the street, town, postcode, state and country in one save are stored together as the member’s own address (history kept, clubs they belong to updated) and then copied into the profile fields for the code that still reads them. If LH Addresses refuses the address, those fields are reported as rejected. Without LH Addresses active they are saved as before.
- 3.21.0: LH Phone Numbers is now a required plugin (Requires Plugins: lh-phone-numbers) and the only store for phone numbers. Phone validation uses LH Phone Numbers’ normaliser, so there is one set of rules and one default region (its lh_phone_numbers_return_default_region filter), and each save is validated once. The bundled libphonenumber library is removed from Composer. Phone reads, saves, clears, the admin Users search, search-users, the add-by-phone lookup and LH Contacts cards no longer fall back to the legacy lh_profile-phone and lh_profile-secondary_phone meta, and that meta is no longer shown in REST. handle_secondary_phone_update() accepts an optional region hint, and the field saver reports a rejected phone number correctly.
- 3.20.0: Retires the phone number taxonomy (lh_profile-phone_tax) and its daily sync: phone numbers live in LH Phone Numbers, which is the only place they are read from. The taxonomy is no longer registered, the daily lh_profile_wakeup cron that only ran the sync is no longer scheduled and any event still scheduled is cleared, and create_phone_taxonomy() and run_processes() are removed. Existing terms are left in the database for now. The phone and secondary phone meta are no longer shown in REST while LH Phone Numbers is active, since LH Phone Numbers stopped keeping them up to date.
- 3.19.4: update-user-profile reads a member’s current phone and secondary phone from LH Phone Numbers when it is active, so its preview, its check that nothing changed since the preview, its read-back after applying and the audit trail’s before values all use the numbers LH Phone Numbers holds.
- 3.19.3: The Users screen search now matches phone numbers held in LH Phone Numbers when it is active: every current number a user has, not just the primary, with each user listed once. Without LH Phone Numbers it searches the phone field as before.
- 3.19.2: More of LH Profile Page reads phone numbers from LH Phone Numbers when it is active, through LH_Profile_Phone_Field::return_user_meta(): the fill-if-empty checks and read-back of the create-or-fill-user ability (LH_Profile_Fill_Fields), the fill_empty check of the profile field saver, and the recipient phone tokens in CRM notification emails. Clearing a phone or secondary phone through the field saver (the wp-admin Profile Data form) now removes the number in LH Phone Numbers directly instead of deleting the phone field and relying on the mirror.
- 3.19.1: Phone numbers shown by LH Profile Page now come from LH Phone Numbers when it is active, through two new helpers: LH_Profile_Phone_Field::return_user_phone() (a user’s primary or next number) and return_user_meta() (get_user_meta() for profile fields, with the two phone keys read from LH Phone Numbers). Moved over: the phone and secondary phone inputs (the secondary phone value is now escaped), the BuddyPress xProfile phone field, the check-in checks for a missing phone and the check-in table’s Mobile column, the group reports Phone Number column and the phone column of the users CSV export (through LH Export Users to CSV’s new lh_eutc_value filter). Without LH Phone Numbers they read the phone fields as before.
- 3.19.0: With LH Phone Numbers active, phone lookups now use its tables. Adding a member to a group by phone number matches any of a member’s current numbers, not just their primary; a number shared by several members matches the one whose primary it is, and no one if that is unclear. The search-users ability’s phone filter searches every current number, not just the primary and secondary phone fields, and works with match_mode any alongside other fields. Its phone and secondary_phone results are the member’s primary number and the next one. Without LH Phone Numbers, the phone fields are used as before.
- 3.18.0: Contact cards use LH Contacts 0.4.0’s card data keys: birthday, gender, and the home address as an entry in the addresses list. Phone numbers are left to LH Phone Numbers when it is active, which supplies every number with the primary preferred; without it the primary phone is still added. The phone meta keys are no longer tracked for card changes while LH Phone Numbers is active, since LH Contacts follows its change action instead.
- 3.17.0: Phone and secondary phone are now saved through LH Phone Numbers when it is active (0.5.0 or later): its tables are written first and it writes the meta back, so the tables are the source of truth. Without LH Phone Numbers, phones are saved to user meta as before.
- 3.16.2: Updates the bundled libphonenumber (giggsey/libphonenumber-for-php-lite) from 8.13 to 9.0, in step with LH Phone Numbers, so phone fields accept newly allocated Australian mobile ranges such as 0494.
- 3.16.1: Removes a temporary diagnostic that wrote a debug-log line, with a call stack, whenever a signed-in front-end form submission was redirected into wp-admin. It was added to trace a one-off redirect to another site’s dashboard after saving a profile on Princes Park Touch; the redirect has not recurred. No change in behaviour.
- 3.16.0: update-user-profile takes an optional display_name_from, so a name correction and the display name are changed together. The display name is built from the names as they will be after the change, using the same choices as sync-display-name (e.g. known_as_last), never free text. It is shown in the preview, applied with the same confirm_token and recorded in the same audit trail entry. fields can now be left out to change only the display name. A display name that follows a changed Known as is also listed in the changes and the audit entry. sync-display-name now records each change on the member’s audit trail as “Profile details changed”, with the lh-tasks task when given, and returns its audit_entry_id.
- 3.15.0: Added the update-user-profile ability, which corrects a user’s profile fields (legal names, Known as, phones, gender, birthdate and address) by overwriting what is stored. It works in two calls: a preview that shows each value before and after and returns a confirm_token, then the same call with the token to apply. Every value is validated before anything is written, so a single invalid value changes nothing. Email, login, password, display name and roles stay with their own flows. Because profile fields are shared across the network, promote_users holders can only change users who have never claimed their account on any site; install_plugins holders can change anyone. Each change is recorded on the member’s audit trail as “Profile details changed”, with the old and new values, the reason and the lh-tasks task when given, and is kept forever so it can be reversed. The member is not notified.
- 3.14.0: Adds a “Known as” profile field: the first name a member goes by when it isn’t their legal first name (e.g. “Tezzuh”), so first and last name can hold the legal name. New xProfile field type “User Known As” (lh_profile-known_as), stored in WordPress’s own nickname meta and validated as one first name (no surname, spaces or email address). Leaving it empty on the profile form clears it back to the legal first name rather than blanking the nickname. Saving or clearing it updates a display name that was built from the names to “Known as + last name”. sync-display-name gains display_name_from known_as_last; search-users returns known_as and can search on it; create-or-fill-user can fill it (and refuses known_as together with nickname). Changes are stamped in lh_profile-updated_field/_time like other profile fields.
- 3.13.0: LH Profile Page’s xProfile field types (first and last name, display name, phone, birthdate, gender, street address, town and postcode) store their values in user meta, so BuddyPress field visibility does not apply to them. Each type now declares that it does not support custom visibility: BuddyPress hides the visibility settings for these fields in wp-admin, and templates that check field type support (BP LocalHero 0.1.47 and later) no longer show a visibility control or ‘This field can be seen by’ label for them.
- 3.12.5: Reverts 3.12.2 to 3.12.4. The User Birthdate field type again supports custom visibility like any other field type, so BuddyPress reads its default visibility from the field’s xProfile meta and no longer resets it to public when the field is saved in wp-admin. The map_meta_cap filter and temporary debug logging are removed. Whether members can change visibility is set per field in its xProfile settings.
- 3.12.4: Temporary diagnostic logging for the birthdate visibility control filter. Writes one line per check to the PHP error log. This is removed in a follow-up release.
- 3.12.3: The User Birthdate field no longer shows the ‘This field can be seen by’ visibility label to members. The visibility control is denied for this field type through the map_meta_cap filter, so BuddyPress does not render the block at all. Stored visibility and the member’s birthdate value are unchanged.
- 3.12.2: The User Birthdate field type no longer offers a per-member visibility choice. Its supported features now disable custom visibility, so the visibility selector is not shown to members. Visibility is still stored per field in BuddyPress xProfile meta and is not synced or changed by this code.
- 3.12.1: Reverts 3.12.0. The birthdate field type no longer fixes its own visibility or stops members choosing who sees it, the once-per-site visibility sync is removed, and the lh_profile_private_xprofile_field_types filter is gone. Each field’s visibility settings are again read only from the field’s own settings, as BuddyPress stores them.
- 3.12.0: Dates of birth in BuddyPress profiles are now private by default. Every User Birthdate xProfile field is set to Only Me, so only the member and site moderators can see it, and members no longer get a choice of who can see it, so the profile screen no longer says Everyone. New fields and fields saved on the Profile Fields screen get this from the field type itself, and existing fields on each site are brought into line once, the first time the site loads; fields already at a private level are left as they are. Other field types can be made private the same way with the new lh_profile_private_xprofile_field_types filter.
- 3.11.2: The Birthdate column in LH Buddypress Group Reports is now only added for people who can manage the site’s users (promote_users), so group admins and moderators such as team captains no longer see members’ dates of birth in their group’s Report. Sites can change who sees it with the new lh_profile_user_can_view_report_birthdates filter.
- 3.11.1: sync-display-name no longer lets a site admin rename a member across the network. With promote_users it now only changes users who have never claimed their account (no role other than unclaimed on any site), plus your own account; users with install_plugins can change any user, on any site.
- 3.11.0: New lh-profile-page/sync-display-name ability: sets a user’s display name to one of the combinations the WordPress profile screen offers (nickname, first name, last name, “First Last” or “Last First”), built from their stored names and never free text. dry_run defaults to true, the result shows the display name before and after and every available combination, and it requires promote_users on a site the user has an account on (site_id supported); super admins and holders of privileged roles are refused. create-or-fill-user now reports display_name_stale and display_name_options when it fills an existing user’s first or last name, so a display name that no longer uses the new name can be fixed with sync-display-name.
- 3.10.6: search-users: a single value passed for an array parameter (e.g. id: 1016224 instead of id: [1016224]) is now treated as a one-item array. Previously WordPress accepted the scalar as valid input but the search silently dropped that filter, so id returned the first page of all site users instead of the one asked for. This applies to every array parameter, including ones other plugins add (such as member_type), and an empty or true/false value for one is now refused with an error rather than ignored.
- 3.10.5: Profile fields (phone, gender, birthdate and address) now go into contact cards built by LH Contacts, which replaces LH Vcard: the integration hooks lh_contacts_add_data and lh_contacts_return_all_tracked_meta_fields instead of the lh_vcard_ filters, so a change to any of these fields still updates the member’s card and syncs to phones.
- 3.10.4: Fixed a JavaScript error when saving a BuddyPress profile group that does not show the first name, last name and display name fields together. The display name is now only rebuilt from first and last name when all three fields are on the form.
- 3.10.3: Shorter MCP ability descriptions. The opening sentence of create-or-fill-user and search-users now says what the ability does and returns in under 115 characters, because discover-abilities lists only that sentence. The detail follows unchanged. Wording only: no change to behaviour, inputs or outputs.
- 3.10.2: search-users, create-or-fill-user and set-user-roles are marked as working on one site’s members (meta site_scoped). Where LH MCP Adapter Extensions is active they take an optional site_id to search, add or change roles for members of another site you belong to, with promote_users checked on that site. Profile fields are user meta, which is network-wide, so they are the same whichever site is named. Calls without site_id are unchanged.
- 3.10.1: Task #150552: close the input schemas of create-or-fill-user, search-users and set-user-roles with additionalProperties false, so a misspelt parameter is rejected instead of silently ignored. search-users stays extensible: properties added through the _search_users_input_properties filter (lh-membership, lh-vcard) are part of the schema and still accepted.
- 3.10.0: Added the lh-profile-page/set-user-roles MCP ability, which adds and removes a user’s roles on the current site. It requires promote_users, and promote_user on the target. It only accepts roles the caller could assign in wp-admin, and never a privileged role (one carrying promote_users, edit_users, manage_options or install_plugins). It refuses users who hold a privileged role, super admins, the calling account, users with no account on the site, and any change that would leave the user with no role. Dry run by default.
- 3.9.4: search-users now describes every search parameter to MCP clients: id, each profile and account field (including how phone and postcode match), the birthdate bounds, match_mode, limit and offset.
- 3.9.3: Stopped writing members’ phone numbers to the debug log. The phone number sync cron logged every phone number it processed, and the list of user IDs, whenever debugging was on; both leftover debug lines are removed. No change to what the sync does.
- 3.9.2: search-users no longer builds the vcard_url itself. LH Vcard 1.9.0 and later adds it through search-users’ extension filters, so LH Profile Page no longer calls into LH Vcard. Callers see the same vcard_url field when LH Vcard is active and the caller can view vCards; when LH Vcard is inactive the field is now absent rather than an empty string.
- 3.9.1: Adding members to a group by phone number now hooks LH Membership’s Add New Members form (filter lh_membership_add_members_user_fallback), which replaced the form in the retired LH Buddypress Group Activities and Notifications.
- 3.9.0: search-users can now be extended by other plugins, so data owned elsewhere can be searched and returned alongside profile fields without LH Profile Page depending on those plugins. Four new filters, all prefixed lh_profile: _search_users_input_properties and _search_users_result_properties extend the input and per-user output schemas (applied when the ability registers); _search_users_restrictions returns include and exclude user IDs, or a WP_Error to refuse the search, applied as hard restrictions like id whatever match_mode is; _search_users_results filters each page of results so a consumer can add its fields with one query per page. The first consumer is LH Membership, which adds membership status. The ability description now says results are restricted to users with an account on the current site, rather than calling them members, to avoid confusion with LH Membership’s members.
- 3.8.2: search-users: fix match_mode any killing the MySQL connection, and surface DB errors instead of returning bogus results. 1. Under match_mode any, each field was added to meta_query as its own nested relation=>OR group. WP_Meta_Query only shares a table alias between sibling clauses, so every nested group got its own INNER JOIN on the network-global usermeta table, and under OR whichever branch didn’t match left its join unconstrained โ a row-multiplying cross product (seen in the debug log as ‘MySQL server has gone away’ for a town+postcode search). Under OR, execute() now flattens every field’s clauses into the single top-level OR list (logically identical), so they all share one join. AND mode is unchanged. 2. When the query died, get_results() was empty but the follow-up SELECT FOUND_ROWS() on the reconnected session returned a stale 1, so the ability reported total_found 1 with no users. run_user_query() now captures $wpdb->last_error (via the found_users_query filter, which runs before FOUND_ROWS() would clear it, plus a direct check afterwards for count_total=false queries) and returns a WP_Error, which matching_user_ids() and execute() propagate.
- 3.8.1: search-users now honours match_mode any across every field. Previously the account fields (email, user_login, display_name) were always ANDed with the profile fields, so a search for an email OR a town returned only users matching both. With match_mode any and both kinds of field supplied, the account-field matches and the profile-field matches are now found separately and combined, so a user matching either is returned; paging, the total and the id restriction all apply to the combined set. match_mode all, and searches using only one kind of field, behave as before.
- 3.8.0: search-users can now look users up by ID and login, returns their login and roles, and pages past the first 100 results. New inputs: id (an array of user IDs, always applied as a restriction on top of the other fields, whatever match_mode is), user_login (partial match, OR-ed with email and display_name values like the other account columns) and offset (for paging together with limit). Each result now includes user_login and roles, the user’s role slugs on the current site, so unclaimed users and participants can be told apart. The ability also declares itself read-only, non-destructive and idempotent. This makes it the single user-lookup ability: lh-mcp-general-abilities removed its own network-wide search-users in 1.12.0 in favour of this site-scoped one.
- 3.7.2: Profile fields filled in on LH Buddypress Group Invites’ invite-by-email form (phone, gender, birthdate, postcode and names) are now saved to the person being invited, using the same rules as CRM enquiry forms: a value is only written where the invitee has none, unless the person sending the invite may edit the invitee, in which case it replaces the stored value. Before, those values were never saved to the invitee. This needs the matching lh-buddypress-group-invites release, which stops the form from being addressed to the person sending the invite; until then the form’s inputs still name the inviter.
- 3.7.1: LH CRM enquiry forms and the LH Buddypress Check Ins / Log Entry unknown-user form now save profile fields through the same single save path as the profile screens. For someone allowed to edit the member, supplied values replace stored ones; for everyone else (typically the member themselves filling in a public form) a value is only written where the member has none, and the postal address is only written when all of it is empty, so a postcode from an enquiry form is no longer added to an address that already has a street or town. Phone numbers that cannot be parsed are now rejected instead of deleting the stored number.
- 3.7.0: Profile fields now have a single save path (LH_Profile_Field_Saver) with two explicit modes: overwrite, for a member or someone allowed to edit them changing a profile, and fill_empty, for data arriving from forms and imports, which only fills what is missing and treats the postal address as one unit. The front-end profile edit save and the wp-admin Profile Data save now use it. Every value is validated and saved through its field’s own save path, and an invalid value (for example a phone number that cannot be parsed) is rejected without deleting what was already stored; before, an invalid phone number entered on the front end wiped the saved number. Clearing a field by emptying it now only happens on the wp-admin Profile Data form, for users who can edit all users. Also fixes the front-end display name save, which passed the wrong user to WordPress.
- 3.6.2: Two fixes on the wp-admin user screens. The Users list search (which also matches phone numbers and additional email addresses) no longer replaces the whole search query: before, it rebuilt the query’s conditions from scratch, which could drop other filters such as the site’s role and membership restrictions or a role filter chosen on the screen. It now adds the phone and additional-email columns to WordPress’s own user search instead. On the wp-admin user profile screen, Town and Postcode no longer appear twice: they were added once as contact methods and once in this plugin’s own Profile Data section, and whichever came later in the form overwrote the other when saving. Only the Profile Data inputs remain.
- 3.6.1: Fix: the First Name, Last Name and Display Name profile field types now show the member’s real names. They read from user meta keys that are never written (lh_profile-first_name and so on), so anything reading those fields through BuddyPress โ the profile loop, xprofile_get_field_data() and the xProfile data export โ got a blank value. They now read WordPress’s own first name, last name and display name. The edit screen was unaffected, as it already rendered the real values. The xProfile data export also now returns the real value for every one of this plugin’s field types, including the name fields.
- 3.6.0: Fix: profile fields from this plugin (street address, town, postcode, gender, birthdate, phone and the name fields) can now be edited and saved on the wp-admin Extended Profile screen (Users > Edit > Extended Profile). Before, changes there were silently discarded; only the front-end profile edit screen saved them. The BuddyPress xProfile integration now lives in a class of its own. Other fixes that came with the move: reading one of these fields through BuddyPress no longer runs a full profile loop on every call; profile field values now come from the member whose profile is being shown, so the wp-admin Extended Profile screen shows the member rather than the admin editing them; the gender field’s default setting only applies to gender fields and must be a valid gender; the email shown to admins on profile edit is escaped.
- 3.5.1: Removed code that nothing on the network used: the [lh_profile_admin_form] and [lh_profile_listing_table] shortcodes (no page, template or widget contains either), the onboarding redirect helpers behind them, a group registration form hook, and several other functions whose only callers had already been commented out. No change in behaviour for any live page.
- 3.5.0: Internal restructuring, continued: the gendered avatar fallbacks and the admin Users list additions now live in classes of their own. Avatar output is now escaped, and the columns added to the Users screen (Gender, Additional Emails) are escaped and hidden by default only on the Users screens. Filtering the Users list by gender now checks the value is a real gender and combines with other filters instead of replacing them. The extra user search on phone numbers and additional emails uses prepared queries, and its list of searched fields can be changed with the lh_profile_return_searchable_fields filter. Removed the Google Places API key field from Network Settings: it was never saved or used.
- 3.4.0: Internal restructuring, continued: the LH Buddypress Check Ins / Log Entry integration and the LH CRM integration now live in classes of their own. Fixes that came with the move: saving profile fields from a CRM enquiry no longer overwrites the person’s display name every time (it is only set when it is still a placeholder such as an email address, or when the current user may edit them); CRM saves now validate gender, store phone numbers with the selected country and write birthdates the same way the profile form does; the extra fields on the check-in unknown-user form no longer read undefined values; the mobile and gender columns in the check-in table are escaped and the text-message link is well formed. Two hook listeners that no plugin on the network fires were removed: the group registration hook and the CSV importer hooks.
- 3.3.0: Internal restructuring: the code that connects profile fields to other plugins now lives in three classes of its own instead of the main plugin class โ lh-vcard (profile fields in member vCards), Users Insights (address, gender and birthdate columns and filters), and LH Buddypress Group Reports plus the users CSV export. Two small fixes came with the move: phone links in group reports now include the international + prefix so they dial correctly, and the link text is escaped. The group whose reports also show address columns (previously hard-coded) is now set through the lh_profile_return_address_report_group_ids filter, which still defaults to the same group. No other change in behaviour.
- 3.2.1: Security fix: the front-end profile save now checks the security token (nonce) on the street address and town fields, as it already did for postcode and the other profile fields. Previously a crafted request from another site could change a member’s street address or town if someone allowed to edit that member visited it while logged in. The address inputs already included the token, so profile edit forms and the onboarding form keep working unchanged.
- 3.2.0: The create-or-fill-user ability now reports action unchanged when it is given an existing user and nothing about them changes: every supplied field was already set or was rejected, and the user already had a role on the current site. Before, it reported filled even when nothing was written, which made it impossible to tell from the result whether anything happened. filled and would_fill are still reported whenever a field is (or would be) written or the user is added to the site. Email addresses are now lowercased before the ability looks up or creates a user, so an address typed with capitals, such as Jane@Example.com, is stored the same way as every other address on the network. This affects both the ability and the Add User profile tab, which uses it.
- 3.1.2: Internal tidy-up of the shared class that fills in missing profile fields for the create-or-fill-user ability. Its field definitions named the user meta key under an array key called meta_key, which static analysis mistakes for a slow WP_Query meta_key lookup; it is now called usermeta_key. The code that reads the definitions is updated to match. Anything hooked to the lh_profile_return_fill_field_definitions filter would need the same rename, but nothing on the network uses it. No change in behaviour.
- 3.1.1: Housekeeping after 3.1.0. The plugin header now has an accurate description and declares its requirements and licence: WordPress 6.9 or later (for the Abilities API), PHP 8.0 or later, and GPL-2.0-or-later. Removed two leftover methods and their hooks that added phone and gender inputs to the retired LH Buddypress Add User form; the Add User tab introduced in 3.1.0 handles those fields itself, so nothing called them any more. The shared fill-fields class, the create-or-fill-user ability and the Add User tab are now loaded from the plugin’s own start-up routine alongside its other classes, instead of from the end of the search-users ability file. No change in behaviour.
- 3.1.0: Adds an Add User tab to BuddyPress profiles, replacing the one from the retired LH Buddypress Add User plugin. It appears only on your own profile, and only if you can promote users (the same permission as the create-or-fill-user ability). The form takes first name, last name and email, plus optional phone, gender and a group to add the new person to. The group list shows every group to site moderators and otherwise only groups you administer or moderate. New users are created through the same code path as the create-or-fill-user ability: they get the unclaimed role on the current site, and their phone number is stored in international format. The form will not change an existing account: an email address that already belongs to someone, including a registered email alias, is refused with a message. Invalid phone numbers, unknown genders and groups you cannot manage are reported on the form without creating anything. The tab slug, its menu position and the group list are filterable.
- 3.0.1: Housekeeping after 3.0.0: added index.php guards to the assets (and its images, scripts and styles subdirectories) and includes directories, so their contents cannot be listed if directory indexing is ever enabled on the server, and corrected a code comment in the birthdate field class that still referred to the back-compat proxy methods removed in 3.0.0. No change in behaviour.
- 3.0.0: Default avatar icons are now drawn as SVG on front-end and admin pages: male, female, organisation and robot (traced from the existing PNGs) plus a new unknown icon for users with no gender set, which replaces LH Gravatar Cache’s unknown_user.svg. Every avatar URL (get_avatar_url, BuddyPress avatar URLs, the Gravatar fallback, REST, feeds, email, vCard and push) stays the PNG, and the swap only ever replaces a default icon, never a photo. Breaking change: the back-compat proxy methods on LH_profile_page_plugin for the phone, gender, birthdate, address and name fields have been removed. Call the LH_Profile_*_Field classes directly instead (LH Buddypress Check Ins 3.3.2, PPT Buddypress Extender 1.0.1 and LH Multisite Importer 1.0.1 already do). New filter: lh_profile_return_default_avatar_url.
- 2.17.0: The create-or-fill-user ability can now set the core WordPress user fields user_url (website), nickname, display_name and description (biographical info), as top-level inputs alongside first_name and last_name, so records such as suppliers can carry their website and trading name. They follow the ability’s fill-if-empty rule: for an existing user a field is only filled when it is empty, and a nickname or display name that is still a placeholder (empty, an email address, or the login) counts as empty, matching the test LH User Provisioning uses before it builds one from the names. For a user created by the call they are always written, so a supplied display_name replaces the name built from first and last name. The website must be an http or https address (a bare domain is given https://) of at most 100 characters; the display name is limited to 250 characters; the description keeps line breaks and has HTML removed. Invalid values are reported per field and never stored. The fields are written in one wp_update_user call, so core’s own sanitising filters and hooks, including BuddyPress’s display name sync, run as for a profile edit, and the reported value is what WordPress stored. user_nicename is deliberately not accepted, since on LocalHero it is always the user ID. The returned display_name is now read back after all writes, so it reflects what was actually saved.
- 2.16.2: Load the international phone input (intlTelInput.js, its stylesheet and utils.js) only when a phone field is actually on the page, and make it work in fields added after page load. Previously, rendering a phone field enqueued the stylesheet and intlTelInput.js server-side, so any page that printed one into an inert template (such as the membership registration template printed on every logged-out page) downloaded about 95 KB it never used. The phone field renderer now enqueues only the small lh-profile-page.js, which loads the stylesheet and intlTelInput.js on demand, once, when it finds a phone input โ at page load, or later when one is inserted (for example when the registration dialog opens). This also fixes the phone input in dialogs built from a template: it was never initialised, so the country selector and formatting were missing and the hidden lh_profile-phone and country_code fields were not submitted, meaning phone numbers entered there were not saved. Other fixes: utils.js is now loaded from this site instead of a hardcoded localhero.biz URL, the initial country comes from the site’s default country (falling back to AU), the unused ipapi.co lookup is removed, trim-on-blur now also applies to fields added after load, and a leaked global loop variable is gone.
- 2.16.1: create-or-fill-user now gives an existing user the unclaimed role on the current site when they have an account there but no role on it (for example after their role was removed in wp-admin). Previously such a user counted as already on the site and was left without a role. Users who already have a role on the site keep it unchanged. unclaimed remains the only role the ability can assign; there is no role input. The site field in the result is now one of added, would_add, role_added, would_add_role, already_on_site or failed; already_on_site replaces already_member, since a site account and role have nothing to do with organisation membership.
- 2.16.0: New MCP ability lh-profile-page/create-or-fill-user, replacing lh-buddypress-add-user/create-user (that plugin is being retired). It creates a user with the unclaimed role on the current site from a name, an email and typed profile fields (phone, secondary phone, gender, birthdate, street address, town, postcode). When existing_user is fill_missing and the email or a registered email alias already belongs to an account, it fills only what that account is missing and adds it to the current site if it is not already there, without changing any role, membership or group. No existing value is ever overwritten, and the address is filled as one unit, only when street address, town and postcode are all empty. Phones are stored as E.164, birthdates must be a real past date in Y-m-d, and gender must be one of the stored values; anything invalid is reported per field and never stored. dry_run defaults to true, and the result reports per field what was actually stored (filled, skipped, rejected or failed). The fill rules live in a new shared class, LH_Profile_Fill_Fields, so other importers can use the same logic. The new classes are loaded alongside the existing search-users ability.
- 2.15: Fix: lh-profile-page/search-users registered but wasn’t exposed via MCP (mcp.public defaults false). Add meta.mcp.public=true to the wp_register_ability() args, matching every other public LH ability.
- 2.04: Extracted phone (and secondary phone) rendering/validation/storage logic into LH_Profile_Phone_Field. Added back-compat proxy shims on the god class for every extracted method, after the initial extraction assumption (“nothing external calls this”) turned out wrong โ ppt-lh-membership-extender called render_phone_input() directly and fatalled the site.
- 2.13: Add a filter (lh_profile_birthdate_minimum_age_years, default 0) that lets another plugin restrict the birthdate input’s client-side max attribute to “today minus N years” instead of always today โ purely a native HTML5 constraint (browser blocks submission of a too-recent value, calendar UI itself stays fully navigable/visible), no server-side validation added. Default of 0 preserves exactly today’s existing behaviour (max=today) for anyone not hooking the filter. The UI for configuring the actual age value lives in a separate plugin โ out of scope here.
- 2.12: Switch LH_Profile_Birthdate_Field from UNIX-timestamp storage to a plain ISO date string (Y-m-d), matching what natively submits/reads and having no spurious time-of-day. register_meta_fields() now registers type=string with a sanitize_callback normalising to Y-m-d (via a new shared normalise_to_ymd() helper) instead of type=integer normalising to a timestamp. render_birthdate_input() and handle_birthdate_update() simplified to use the same helper. is_valid_time_stamp() is kept (used internally by normalise_to_ymd() as a legacy-format detector, and still called externally via the god class’s add_vcard_data() through its back-compat shim). This follows the full data migration already completed this session: backup taken, corrupted/unrecoverable rows identified and cleared, one row recovered from its readable companion, test accounts removed, and all remaining rows converted to Y-m-d.
- 2.11: Extracted name fields (first, last, display name) into three separate field classes โ no register_meta() on any of them (first_name/last_name are core WP meta keys, display_name is a wp_users column, not usermeta). v2.12 followed shortly after, removing the three _label() shims entirely once confirmed dead (no caller anywhere, live or dead).
- 2.10: Extracted all five address fields (street address, town, postcode, state/province, country) into five separate field classes, matching the one-class-per-field precedent (postcode kept separate deliberately as a future real-validation candidate). All five registered as validated WP meta.
- 2.08: Extracted birthdate rendering/validation/storage logic into LH_Profile_Birthdate_Field, with back-compat shims. Registered lh_profile-birthdate as validated WP meta (initially UNIX-timestamp typed โ later changed to a Y-m-d string in v2.13).
- 2.06: Add writecrow/country_code_converter as a proper Composer dependency, matching the phone/gender library precedent, replacing the manually-bundled includes/country_code_converter-main/ copy used by register_core_scripts() to derive the intlTelInput default country from the site’s timezone.
- 2.05: Add tuqqu/gender-detector as a proper Composer dependency, matching the giggsey/libphonenumber-for-php-lite precedent, replacing the manually-bundled includes/gender-detector/ copy (currently dead code via guess_first_name_gender(), unused by any hook). Peter will remove the old bundled directory manually once redundant.
- 2.02: Fix 5 latent bugs surfaced by PHPStan (excluding the new_user_update $user_data->display_name fix, held back separately since it re-enables a currently-bypassed permission check and needs a behavioral heads-up): (1) render_phone_input’s elseif checked an undefined $value โ changed to else, no behavior change, just removes the undefined-variable notice. (2) _get_excluded_fields’ entire body was commented out with no return statement โ added an explicit `return ”;` matching its documented string return type, preserving the exact current no-op behavior. (3) override_returned_value never initialized $user_id when both bp_displayed_user_id() and get_current_user_id() are falsy โ added `$user_id = 0;` default. (4) and (5) gender_avatar_fallback_html and get_custom_avatar both guard with `empty($image)` on a DOMNodeList, which is never true for objects regardless of content โ changed both to `0 === $image->length` so the no-image early-return actually fires. Version bump 2.01 -> 2.02.
- 2.01: Migrate write_log() to canonical LH convention (adds $level param, JSON-encodes arrays/objects, colon+2-space line shape) and add return_plugin_debugging_status() filter gate; register-file-class.php delegates return_plugin_namespace() to the main class. Version bump 2.00 -> 2.01. (Third submission: final whitespace-fidelity correction pass in get_custom_avatar/extend_user_search regions and trailing blank line of includes file.)
Changelog
If you like this plugin please consider making a donation to further development

