• Resolved y2kemo

    (@y2kemo)


    Hello,

    I am using Members in a multisite environment and activating it per site. I’ve created a role that I want to reuse in different sites. When I attempt to create the role in a second site I see the role exists and is uneditable. How can I reuse the role in a different site?

Viewing 2 replies - 1 through 2 (of 2 total)
  • jomo

    (@jonathanmoorebcsorg)

    +1 same problem

    jomo

    (@jonathanmoorebcsorg)

    This plugin is building a list of all roles that exist in user memberships and then refusing to save if role exists in this list, even though the role may not actually exist in:

    SELECT * FROM wp_{subsite_}options 
    WHERE option_name like 'wp_{subsite_}user_roles'

    One workaround or hack would be to disable this check by commenting out lines 238-9 of class-role-new.php and remove the condition from line 212.
    This does allow the other site role to be cloned and saved onto the current site.

    However it may not copy custom capabilities: for example if you copy the shop manager role from a wooCommerce site to a site without wooCommerce installed, none of the capability information is saved. This may not be a problem if all you want to do is test the user’s role membership [in this example the woocommerce capabilities are fairly meaningless if woocommerce is not installed].

    More complete solutions may be:
    https://www.role-editor.com/ pro paid version of free plugin, has a role management function at network admin level

    https://wordpress.stackexchange.com/questions/102368/add-role-across-network-in-multisite
    this thread has a code discussion

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Re-use roles per site in multisite installation’ is closed to new replies.