Title: Shared User Table Roles
Author: wp_joris
Published: <strong>2013 年 5 月 6 日</strong>
Last modified: 2013 年 5 月 6 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/shared-user-table-roles.svg)

# Shared User Table Roles

 作者：[wp_joris](https://profiles.wordpress.org/wp_joris/)

[下载](https://downloads.wordpress.org/plugin/shared-user-table-roles.zip)

 * [详情](https://cn.wordpress.org/plugins/shared-user-table-roles/#description)
 * [评价](https://cn.wordpress.org/plugins/shared-user-table-roles/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/shared-user-table-roles/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/shared-user-table-roles/#developers)

 [支持](https://wordpress.org/support/plugin/shared-user-table-roles/)

## 描述

When sharing the user and usermeta table between multiple wordpress
 installations
using the same database, any role given to the user is only valid for a single wordpress
installation.

This plugin ensures user roles, user capabilities and user settings are
 shared 
between the multiple installations. This is configured using a wp-config constant.

Any role set in any of the installations will be reflected in all other
 installations.

Caveats:

 * Compatability with wordpress multisite is unknown

## 安装

To set up multiple wordpress installations using the same database:

 1.  Install all wordpress installations using the same database, but using a
      different
     $table_prefix in wp_config.
 2.  For example two installations with “eng_” and “nld_”.
 3.  Designate one wordpress installation as “primary”. All other installations are
     
     secondary
 4.  For example the installation with the prefix “eng_”.
 5.  Install and activate this plugin on all secondary wordpress installations.
 6.  In this example “nld_”.
 7.  On all secondary wordpress installations configure CUSTOM_USER_TABLE and
      CUSTOM_USER_META_TABLE
     in wp-config to use the tables (users and usermeta) of the primary installation.
 8.  See below for an example
 9.  On all secondary wordpress installations, set SHARED_USER_TABLE_ROLES_PREFIX
      
     to be equal to the table prefix of the primary installation.

#### Primary

For example the relevant wp-config settings for the primary installation would
 
look like:

    ```
        $table_prefix  = 'eng_';
    ```

#### Secondary

For example the relevant wp-config settings for secondary installations would
 look
like:

    ```
        $table_prefix  = 'nld_';
        define('SHARED_USER_TABLE_ROLES_PREFIX', 'eng_');
        define('CUSTOM_USER_TABLE', 'eng_users');
        define('CUSTOM_USER_META_TABLE', 'eng_usermeta');
    ```

## 评价

![](https://secure.gravatar.com/avatar/a64d6676c4f0639efc8643c74b6eb8f28167c32bd6afe69090d960cd99565185?
s=60&d=retro&r=g)

### 󠀁[Just perfect!](https://wordpress.org/support/topic/just-perfect-286/)󠁿

 [charlyfox](https://profiles.wordpress.org/charlyfox/) 2018 年 1 月 9 日

Thanks for this great little plugin. Does exactly what it’s supposed to do. Works
well with wordpress 4.9.1 … Keep it up! 🙂

 [ 阅读所有4条评价 ](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/)

## 贡献者及开发者

「Shared User Table Roles」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ wp_joris ](https://profiles.wordpress.org/wp_joris/)

[帮助将「Shared User Table Roles」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/shared-user-table-roles)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/shared-user-table-roles/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/shared-user-table-roles/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/shared-user-table-roles/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/shared-user-table-roles/)。

## 更新日志

#### 1.0

 * initial release

## 额外信息

 *  版本 **1.0**
 *  最后更新：**13 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.5 或更高版本 **
 *  已测试的最高版本为 **3.5.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/shared-user-table-roles/)
 * 标签
 * [roles](https://cn.wordpress.org/plugins/tags/roles/)[user](https://cn.wordpress.org/plugins/tags/user/)
   [users](https://cn.wordpress.org/plugins/tags/users/)[wp-config](https://cn.wordpress.org/plugins/tags/wp-config/)
 *  [高级视图](https://cn.wordpress.org/plugins/shared-user-table-roles/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/shared-user-table-roles/reviews/)

## 贡献者

 *   [ wp_joris ](https://profiles.wordpress.org/wp_joris/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/shared-user-table-roles/)