=== HarmonyUser Sync === Contributors: wowown Tags: user sync, multisite, woocommerce, user synchronization, customer sync Requires at least: 5.6 Tested up to: 6.8 Requires PHP: 7.0 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Effortlessly synchronize WordPress users and WooCommerce customers across multiple websites securely and reliably. 无缝、安全、可靠地同步多个网站之间的用户和客户信息。 == Description == English: Do you manage multiple WordPress websites and struggle to keep user information consistent across them? Manually updating profiles, handling registrations, and managing deletions on each site is tedious and error-prone. HarmonyUser Sync solves this problem by providing robust, automated synchronization of user data (including standard users and WooCommerce customers) between your WordPress installations. Leveraging the secure WordPress REST API and Application Passwords for authentication (we never store your admin passwords!), HarmonyUser Sync ensures that user creation, updates (profile info, roles, passwords), and deletions are seamlessly mirrored across designated target sites. It features intelligent loop prevention to avoid data storms, detailed logging for traceability, and flexible options for both automatic and manual synchronization. Ideal for brand networks, multi-store WooCommerce setups, or any scenario requiring unified user management across separate WordPress sites. Key Features: * Automatic Sync: Real-time synchronization for user registration, profile updates, and deletions. * WooCommerce Support: Seamlessly syncs WooCommerce customer data. * Manual Sync Tool: Select specific users and target sites for bulk synchronization. * Secure Authentication: Uses Application Passwords – no admin passwords stored. * Intelligent Loop Prevention: Prevents infinite synchronization loops. * Global User Identification: Reliably identifies the same user across different sites. * Target Site Management: Easy interface to add, manage, and test connections to target sites. * Detailed Sync Logs: Track every sync operation for auditing and troubleshooting. * Role-Based Sync: Option to sync only users with specific roles. * Bi-directional & Chain Sync Ready: Supports complex synchronization topologies through configuration. --- 简体中文: 您是否管理着多个 WordPress 网站,并为保持它们之间用户数据的一致性而烦恼?在每个站点上手动更新个人资料、处理注册和管理删除操作既繁琐又容易出错。HarmonyUser Sync 通过提供强大、自动化的用户数据(包括标准用户和 WooCommerce 客户)同步功能,解决了这个问题。 HarmonyUser Sync 利用安全的 WordPress REST API 和应用程序密码进行认证(我们绝不存储您的管理员密码!),确保用户的创建、更新(个人信息、角色、密码)和删除操作能够无缝地镜像到指定的目标站点。它具有智能防循环机制以避免数据风暴,提供详细的日志以保证可追溯性,并为自动和手动同步提供了灵活的选项。非常适合品牌网站群、多店铺 WooCommerce 设置或任何需要在独立 WordPress 站点间实现统一用户管理的场景。 主要功能: * 自动同步: 实时同步用户注册、个人资料更新和删除操作。 * WooCommerce 支持: 无缝同步 WooCommerce 客户数据。 * 手动同步工具: 可选择特定用户和目标站点进行批量同步。 * 安全认证: 使用应用程序密码 – 不存储管理员密码。 * 智能防循环: 防止无限同步循环。 * 全局用户标识: 可靠地识别不同站点上的同一用户。 * 目标站点管理: 简洁的界面,用于添加、管理和测试到目标站点的连接。 * 详细同步日志: 跟踪每一次同步操作,便于审计和故障排除。 * 基于角色的同步: 可选择仅同步特定角色的用户。 * 支持双向与链式同步: 通过配置支持复杂的同步拓扑。 == Installation == English: 1. Via WordPress Admin (Easiest): * Navigate to `Plugins > Add New`. * Search for "HarmonyUser Sync". * Click "Install Now" and then "Activate". 2. Manual Upload: * Download the plugin ZIP file from the WordPress Plugin Directory or the source where you obtained it. * Navigate to `Plugins > Add New > Upload Plugin`. * Choose the downloaded ZIP file and click "Install Now". * Click "Activate". 3. Via FTP: * Download the plugin ZIP file and unzip it. * Upload the `harmonyuser-sync` folder to the `/wp-content/plugins/` directory on your server. * Navigate to `Plugins > Installed Plugins` in your WordPress admin and click "Activate" for HarmonyUser Sync. --- 简体中文: 1. 通过 WordPress 后台 (最简单): * 导航至 `插件 > 安装插件`。 * 搜索 "HarmonyUser Sync"。 * 点击 "现在安装",然后点击 "启用"。 2. 手动上传: * 从 WordPress 插件目录或您获取插件的来源下载插件的 ZIP 文件。 * 导航至 `插件 > 安装插件 > 上传插件`。 * 选择下载的 ZIP 文件,然后点击 "现在安装"。 * 点击 "启用"。 3. 通过 FTP: * 下载插件 ZIP 文件并解压缩。 * 将 `harmonyuser-sync` 文件夹上传到您服务器上的 `/wp-content/plugins/` 目录。 * 在您的 WordPress 后台中导航至 `插件 > 已安装插件`,然后为 HarmonyUser Sync 点击 "启用"。 == Configuration / Usage == English: 1. After activating the plugin, a new menu item "User Sync" will appear in your WordPress admin sidebar. 2. General Settings (`User Sync > Settings`): * `Enable Auto Sync`: Check this to automatically sync user changes (create, update, delete). * `Sync User Roles`: Select which user roles should trigger synchronization. Users with unselected roles will not be synced. * `Log Retention Days`: Set how long sync logs should be kept (e.g., 30 days). Older logs will be automatically purged. * `Enable Sync Log`: Check this to record detailed logs of sync operations. Recommended for troubleshooting. * Save your changes. 3. Target Sites (`User Sync > Target Sites`): This is where you define the sites *to which* the current site will send user data. * Click "Add New". * `Site Name`: A recognizable name for the target site (e.g., "My Store Blog"). * `Site URL`: The full URL of the target WordPress site (e.g., `https://target-site.com`). HarmonyUser Sync must also be installed and activated on this target site. * `Admin Username`: The WordPress administrator username on the target site. * `Admin Password`: The password for the administrator username on the target site. This is used only once to generate an Application Password and IS NOT STORED. * `Status`: Set to "Active" to enable syncing to this site. * Test Connection: Click this button *before saving*. It will attempt to connect to the target site using the provided credentials and generate a secure Application Password specifically for this sync connection. You should see a success message if it works. The Application Password will be stored securely (not the original admin password). * Click "Save Target Site". 4. Repeat step 3 for all other WordPress sites you want this site to sync *to*. 5. Manual Sync (`User Sync > Manual Sync`): * Select the user(s) you want to sync from the list. * Select the target site(s) you want to sync these users *to*. * Click "Apply" to start the manual synchronization process. This is useful for initial bulk syncs or syncing specific users on demand. 6. Sync Logs (`User Sync > Sync Logs`): View the history of all sync operations, filter by date, site, status, etc. Important: For bi-directional sync (e.g., Site A syncs to Site B, and Site B syncs to Site A), you need to configure HarmonyUser Sync on both sites, adding the other site as a target in each respective configuration. --- 简体中文: 1. 激活插件后,一个新的菜单项 "User Sync" 将出现在您的 WordPress 管理侧边栏中。 2. 常规设置 (`User Sync > 设置`): * `启用自动同步`: 勾选此项以自动同步用户更改(创建、更新、删除)。 * `同步用户角色`: 选择哪些用户角色应触发同步。未被选中的角色的用户将不会被同步。 * `日志保留天数`: 设置同步日志的保留时间(例如 30 天)。旧日志将被自动清除。 * `启用同步日志`: 勾选此项以记录详细的同步操作日志。推荐用于问题排查。 * 保存您的更改。 3. 目标站点 (`User Sync > 目标站点`): 在这里定义当前站点将要把用户数据发送*到*的站点。 * 点击 "添加"。 * `站点名称`: 目标站点易于识别的名称(例如 "我的商店博客")。 * `站点 URL`: 目标 WordPress 站点的完整 URL(例如 `https://target-site.com`)。HarmonyUser Sync 插件也必须在目标站点上安装并激活。 * `管理员用户名`: 目标站点上的 WordPress 管理员用户名。 * `管理员密码`: 目标站点上该管理员用户名的密码。此项仅用于一次性生成应用程序密码,并且不会被存储。 * `状态`: 设置为 "启用" 以允许同步到此站点。 * 测试连接: *在保存之前*点击此按钮。它将尝试使用提供的凭据连接到目标站点,并为此同步连接生成一个安全的应用程序密码。如果成功,您应该会看到成功消息。应用程序密码将被安全地存储(而不是原始管理员密码)。 * 点击 "保存目标站点"。 4. 为您希望当前站点同步*到*的所有其他 WordPress 站点重复步骤 3。 5. 手动同步 (`User Sync > 手动同步`): * 从列表中选择您想要同步的一个或多个用户。 * 选择您想要将这些用户同步*到*的一个或多个目标站点。 * 点击 "应用" 以开始手动同步过程。这对于初始批量同步或按需同步特定用户非常有用。 6. 同步日志 (`User Sync > 同步日志`): 查看所有同步操作的历史记录,可按日期、站点、状态等进行筛选。 重要提示: 对于双向同步(例如,站点 A 同步到站点 B,同时站点 B 也同步到站点 A),您需要在两个站点上都配置 HarmonyUser Sync,在各自的配置中将对方站点添加为目标站点。 == Frequently Asked Questions == English: * Q: Is it secure? Does it store my admin passwords? * A: Yes, it's secure. We use WordPress Application Passwords for authentication between sites. You only enter the target site's admin credentials ONCE during setup to generate this Application Password. The plugin NEVER stores your original admin password. * Q: Does it sync WooCommerce customers? * A: Yes, HarmonyUser Sync is designed to synchronize standard WordPress users as well as WooCommerce customers. * Q: How does it prevent infinite sync loops? * A: The plugin includes an intelligent loop prevention mechanism. When a site receives a sync request and prepares to forward it to its own targets, it excludes the original sender and any sites already in the path list, effectively stopping loops. * Q: Can I sync only users with a specific role? * A: Yes, in the plugin's Settings page, you can select which user roles should be eligible for synchronization. * Q: What happens if a sync operation fails? * A: Every sync attempt (success or failure) is logged in detail under `HarmonyUser Sync > Sync Logs`. You can review the logs to diagnose any issues. * Q: Can I manually sync specific users? * A: Yes, the `Manual Sync` tool allows you to select specific users and target sites for on-demand synchronization. * Q: Can I set up bi-directional sync between Site A and Site B? * A: Yes. Install and activate HarmonyUser Sync on both Site A and Site B. On Site A, add Site B as a target site. On Site B, add Site A as a target site. --- 简体中文: * 问:这个插件安全吗?它会存储我的管理员密码吗? * 答:是的,它是安全的。我们使用 WordPress 的应用程序密码在站点之间进行认证。您仅在设置过程中输入一次目标站点的管理员凭据以生成此应用程序密码。插件绝不会存储您的原始管理员密码。 * 问:它同步 WooCommerce 客户吗? * 答:是的,HarmonyUser Sync 设计用于同步标准的 WordPress 用户以及 WooCommerce 客户。 * 问:它如何防止无限同步循环? * 答:插件包含一个智能防循环机制。当一个站点接收到同步请求并准备将其转发到自己的目标时,它会排除原始发送方和路径列表中已有的任何站点,从而有效阻止循环。 * 问:我可以只同步特定角色的用户吗? * 答:可以。在插件的“设置”页面中,您可以选择哪些用户角色符合同步条件。 * 问:如果同步操作失败了怎么办? * 答:每一次同步尝试(无论成功或失败)都会详细记录在 `HarmonyUser Sync > 同步日志` 下。您可以查看日志以诊断任何问题。 * 问:我可以手动同步特定用户吗? * 答:可以。“手动同步”工具允许您选择特定用户和目标站点进行按需同步。 * 问:我可以在站点 A 和站点 B 之间设置双向同步吗? * 答:可以。在站点 A 和站点 B 上都安装并激活 HarmonyUser Sync。在站点 A 上,将站点 B 添加为目标站点。在站点 B 上,将站点 A 添加为目标站点。 == Screenshots == 1. Target Site Management: Overview of configured target sites, status, and actions. 2. Adding/Editing a Target Site: Form for adding site details and generating the Application Password. 3. General Settings: Configuration options for auto-sync, roles, and logging. 4. Manual Synchronization Tool: Interface for selecting users and target sites for manual sync. 5. Sync Log Viewer: Detailed view of past synchronization operations with filtering options. == Changelog == English: = 1.0.0 = * Initial release of HarmonyUser Sync. * Feature: Automatic and manual synchronization for user create, update, delete. * Feature: WooCommerce customer synchronization. * Feature: Secure authentication using Application Passwords. * Feature: Intelligent loop prevention mechanism. * Feature: Target site management with connection testing. * Feature: Detailed synchronization logs. * Feature: Configurable role syncing and log retention policy. --- 简体中文: = 1.0.0 = * HarmonyUser Sync 首次发布。 * 功能:用户创建、更新、删除的自动和手动同步。 * 功能:WooCommerce 客户同步。 * 功能:使用应用程序密码的安全认证。 * 功能:智能防循环机制。 * 功能:带连接测试的目标站点管理。 * 功能:详细的同步日志。 * 功能:可配置的角色同步和日志保留策略。 == Upgrade Notice == English: = 1.0.0 = * Initial release of HarmonyUser Sync. No upgrade steps needed yet. --- 简体中文: = 1.0.0 = * HarmonyUser Sync 首次发布。暂无升级步骤。