Both abilities are in the lh-profile-page category, require promote_users, and act on the current site only.

lh-profile-page/create-or-fill-user

Class LH_Profile_Create_Or_Fill_User_Ability (includes/lh-profile-create-or-fill-user-ability-class.php). Replaces lh-buddypress-add-user/create-user. Creates a user from an email, first and last name and typed profile fields, or fills in what an existing account is missing. Requires LH User Provisioning.

  • Inputs: email (required), first_name, last_name, fields (profile fields, schema from LH_Profile_Fill_Fields), group_id (new users only), existing_user (refuse by default, or fill_missing), dry_run (default true).
  • Existing users are found by email or a registered email alias (lh_user_provisioning_resolve_user()). With fill_missing, names and profile fields are filled only where empty; the address is filled as one unit only when street address, town and postcode are all empty. Nothing existing is overwritten, and no organisation membership or group is changed.
  • Role: unclaimed is the only role the ability assigns; there is no role input. A new user gets it on the current site. An existing user with no account on the site is added with it; one with an account on the site but no role on it is given it; one who already has a role on the site keeps it. A site account and role are separate from organisation membership.
  • Last activity: LH User Provisioning (1.3.3+) seeds a new user’s BuddyPress last activity from their registration date, and never bumps an existing value.
  • Result: action (created, would_create, filled, would_fill); site (added/would_add, role_added/would_add_role, already_on_site or failed, where added and role_added are checked against the stored role); group when a group_id was given; and a per-field report (filled, would_fill, skipped, rejected, failed, unknown_field).

lh-profile-page/search-users

Searches users on the current site by any combination of profile fields: phone (digits-only partial match against primary and secondary), email, names, town, street address, state/province and country (partial), postcode (exact), gender (exact, one of Male, Female, Organisation, Robot) and a birthdate range (birthdate_before/birthdate_after, inclusive). Values within a field are OR-ed; match_mode combines fields with AND (default) or OR. limit defaults to 20, maximum 100. Each result includes the profile fields and, when LH Vcard is active, a signed short-lived vcard link.