create-or-fill-userisLH_Profile_Create_Or_Fill_User_Ability(includes/lh-profile-create-or-fill-user-ability-class.php). It replacedlh-buddypress-add-user/create-userand needs LH User Provisioning, which resolves existing users by email or registered alias (lh_user_provisioning_resolve_user()) and, from 1.3.3, seeds a new user’s BuddyPress last activity from their registration date without ever bumping an existing value. Its profile field schema comes fromLH_Profile_Fill_Fields.- Since 3.26.3
create-or-fill-userruns every fill-if-empty test on the first name, last name, nickname and display name throughis_core_field_empty(), so a value that is an email address or the login counts as an empty placeholder and can be filled. Accounts created by lh-email ingestion had their email address stored asfirst_name, so their real names were being skipped. A real name is still never overwritten. - Since 3.30.0 filling an existing user never changes their site membership unless
add_to_siteis true (lh-tasks #155750). Before, an existing user with no role on the current site was always added to it with the unclaimed role. A fill run through Princes Park Touch’s site_id once made 12 shawfactor.com contacts members of Princes Park Touch that way. Withoutadd_to_site,sitereportsnot_on_siteorno_role, and LH User Provisioning is called withadd_to_site => false(1.5.0+) soensure_user()doesn’t add them either. Peter’s rule: never unless asked for. A new user is always added to the current site. bulk-create-or-fill-users(3.27.0) isLH_Profile_Bulk_Create_Or_Fill_Users_Ability(includes/lh-profile-bulk-create-or-fill-users-ability-class.php). It runsLH_Profile_Create_Or_Fill_User_Ability::execute()once per entry, so its rules are exactly the single ability’s, and each entry’s schema is the single ability’sreturn_user_properties()(everything butdry_run). It was added after a roster enrichment needed about 930 single calls.dry_run, and defaults forexisting_userand (3.30.0+)add_to_site, are set once per batch; an entry’s own value wins. A repeated email in the batch is reported asduplicate_emailand not run; aWP_Erroror exception from one entry is reported as that entry’serrorand the rest still run. The result drops skipped fields and anysitethat didn’t change (already_on_site,not_on_site,no_role), so a 100-user batch stays small. Batch size defaults to 100, filterable withlh_profile_bulk_create_or_fill_users_return_max_users. Schema validation still runs on every entry, so one malformed value (an invalid email, a gender outside the enum) refuses the whole call before anything runs; a dry run shows this first.search-usersisLH_Profile_Search_Users_Ability(includes/lh-profile-search-users-ability-class.php). Since 3.8.0 it is the network’s only user-lookup ability. Other plugins extend it with thelh_profile_search_users_input_properties,_result_properties,_restrictionsand_resultsfilters: LH Membership adds membership status, and LH Contacts adds a signed short-livedvcard_url(LH Vcard did until LH Contacts replaced it).update-user-profile(3.15.0) isLH_Profile_Update_User_Profile_Ability(includes/lh-profile-update-user-profile-ability-class.php), the overwrite counterpart tocreate-or-fill-userfor corrections such as membership triage fixes. It validates withLH_Profile_Fill_Fields::validate_value()andLH_Profile_Known_As_Field::validate(), then writes throughLH_Profile_Field_Saverin overwrite mode withclear_empty. The confirm token is a site transient keyed by the token’s hash and bound to actor, user, site and the exact before/after values, asset-primary-sitedoes. Who may use it mirrorssync-display-nameand reuses itsreturn_claimed_roles(): profile fields are network-wide, sopromote_usersonly reaches users unclaimed on every site. Each apply recordsaccount.profile_updatedin LH Audit Trail (member-visible,retention_days0), with the lh-taskstask_idcaptured onwp_ability_normalize_inputat priority 5, before lh-tasks strips it. Capabilities are filterable withlh_profile_update_user_profile_return_capabilityand_return_unrestricted_capability. No member notification, by decision.- Since 3.16.0
update-user-profiletakesdisplay_name_from: the display name is built withLH_Profile_Sync_Display_Name_Ability::return_options()from the names as they will be after the change (overrides forfirst_name,last_nameandnickname), never free text, and goes into the same preview, token and audit entry. A display name that followed a changed Known as is recorded too.sync-display-namerecords its writes through the publicLH_Profile_Update_User_Profile_Ability::record_audit(), with the task fromtake_task_id(), so every display name change by ability is on the audit trail.
Ability implementation notes
If you like this plugin please consider making a donation to further development

