Digital Sovereignty for everyone

Hooks & Filters

Actions

lh_user_provisioning_user_provisioned — fires after ensure_user() completes.

do_action( 'lh_user_provisioning_user_provisioned', WP_User $user, bool $is_new, array $args );

This plugin also listens to two WordPress core hooks network-wide, both at priority 20 so it runs after other plugins’ own handlers as the final word on convention — not exposed as its own hooks, documented here for completeness:

  • user_register — calls the guarded ensure_login_matches_email() / ensure_nicename_matches_id() pair on every new user created anywhere on the network, not just via this plugin’s own API
  • profile_update — same pair, e.g. when someone’s email changes via a profile edit form elsewhere on the network

Filters

lh_user_provisioning_pre_create_userdata — filters the $userdata array immediately before wp_insert_user() is called.

apply_filters( 'lh_user_provisioning_pre_create_userdata', array $userdata, string $email, array $args );

lh_user_identity_get_user_by_email_fallback (consumed, not defined here) — used internally by resolve_existing_user_by_email() to resolve alias emails when lh-user-identity is active. Documented no-op otherwise, so it is always safe to call unconditionally.

apply_filters( 'lh_user_identity_get_user_by_email_fallback', false, string $email );

Cron

lh_user_provisioning_integrity_check — runs hourly. Scans for users where user_login != user_email or user_nicename != CAST(ID AS CHAR), fixing up to 50 per run. With the user_register/profile_update hooks providing real-time coverage everywhere, this is a backstop for accounts predating those hooks (or that slip through some other way) rather than the primary enforcement mechanism.

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.