Digital Sovereignty for everyone

Changelog

  • 1.1.6: Fix MCP calls made with site_id reading and writing the calling site’s xProfile data instead of the target site’s. xProfile is the only BuddyPress component kept per site on LocalHero, and BuddyPress binds its xProfile table names (and the xProfile meta tables on $wpdb) once at load, so switch_to_blog() left them pointing at the calling site; its xProfile cache groups are also global, so cached groups and fields from one site were served for another. New rebind_xprofile_tables() re-points the xProfile tables to the current site and flushes the xProfile cache groups; it runs on lh_mcp_adapter_extensions_site_scope_reset_caches, which fires after every site_id switch and restore. Other code that switches sites is unchanged.
  • 1.1.5: Resume a stalled user sync within about 20 minutes instead of up to 75. The stall check (no progress for stall_after(), 15 min by default) only ran inside the hourly-throttled daily schedule check, so a batch whose request was killed left the run stopped until the next hourly check or until Action Scheduler marked the action failed after an hour. The stall check now has its own 5-minute throttle and runs on init before the hourly check. Each resume is written to the debug log with the run’s phase, cursor and seconds without progress, to help find why batches hang.
  • 1.1.4: Fixed the daily and one-off user sync timing out on large sites. The sync now runs as a chain of short background batches (50 users or 20 seconds each, filterable via lh_bmn_batch_size and lh_bmn_batch_time_limit), each queuing the next, instead of doing every user in one request. Progress is saved per chunk and every step is safe to repeat, so a batch killed part-way resumes where it stopped; the hourly schedule check re-queues a run that has stalled for 15 minutes. Starting a new sync while one is running restarts it cleanly. Deactivation also clears any in-progress run.
  • 1.1.3: The user sync now runs on Action Scheduler where a site has it, falling back to WP-Cron elsewhere. The daily sync and the one-off sync queued when a user registers, joins the site or updates a profile are scheduled through a new queue class, so on sites with Action Scheduler each run is claimed before it starts (no double runs when two cron runners overlap). The one-off sync is debounced: while one is waiting, further changes do not queue another. Syncs queued while switched to another site, as when a user is added to a site, go to that site’s WP-Cron. The daily sync is now created on init on each site where BuddyPress loads, including sites added later, instead of at activation, and the retired lh_bmn_process hook is no longer run. Deactivation removes every queued sync on both runners. The daily and one-off hook names are unchanged and are now filterable (lh_bmn_wakeup_hook, lh_bmn_single_hook), as is the use of Action Scheduler (lh_bmn_uses_action_scheduler).
  • 1.1.2: Fixes an undefined variable warning in the daily user sync. When a member has no xProfile name and no display name, first or last name or email to build one from, the sync now leaves their name alone instead of trying to save an empty one.
  • 1.1.1: Fixed newly added users missing from a site’s BuddyPress member directory. The list of a site’s users that the directory is limited to was cached with no expiry and never cleared, so on a site with a persistent object cache (such as LiteSpeed’s) anyone added to the site after the list was first cached did not appear in the directory, the member count or the sitewide activity feed until the object cache was flushed. The list is now cleared whenever a user registers, is added to or removed from a site, or has their role on it changed, and expires after an hour as a backstop (filterable through lh_bmn_return_users_cache_expiry). The cache key has changed, so lists cached by earlier versions are ignored from this release on. Also fixed looking up another site’s users, which switched to an undefined site ID and restored the site even when it had not switched, and the member count returning nothing instead of false when a site has no users. Changelog history for 1.00 and 1.01 was backfilled from the old readme before this release.
  • 1.01: Minor privacy improvement.
  • 1.00: Initial release.

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.