LH User Provisioning

LH User Provisioning is the canonical, network-wide entry point for creating and cleaning up WordPress users on the LocalHero platform. Rather than calling wp_insert_user() directly, other LH plugins call lh_user_provisioning_ensure_user(), guaranteeing every account — however it was created — meets the same conventions: login matches email, nicename matches numeric user ID, BuddyPress profile scaffolding, and a provenance record of where the account came from.

Why it exists

Before this plugin, user-creation logic — and the login/nicename conventions LocalHero relies on — was duplicated across several plugins (membership registration, BuddyPress group invites, etc.), each with its own drift-prone copy. Centralising it here means a single, guarded, idempotent implementation, and means the convention is enforced network-wide in real time (via user_register/profile_update hooks) for every account, not just ones created through this plugin’s own API — a WooCommerce checkout, a manually-added wp-admin user, or a CSV import all get the same guarantee.

Key features

Install / setup

Network-activate only — activating on an individual site is blocked with an explanatory message, since login/nicename conventions and the provenance column are network-wide concerns. No configuration required.

Who depends on this

lh-buddypress-add-user delegates its actual user creation/cleanup to lh_user_provisioning_ensure_user() rather than duplicating that logic, and lh-user-identity documents this plugin as the preferred route for any plugin that creates or provisions users. This makes LH User Provisioning load-bearing infrastructure that other, independently migration-relevant plugins hard-depend on.

Contents