• joshyhud

    (@joshyhud)


    I am currently working on a WordPress multisite and have access as a Super Admin.

    On all the sub site user pages i can use the change role functionality, but on the network users page this is not shown. I have read that super admins should have promote_users which i have checked and is shown in the wp_options table of the database, but this isn’t shown on the network users page. Does any one know how to show this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    You cannot manage roles (besides being super-admin or not) from the network’s edit user screens. All roles are managed on a per site basis, there is no global application of roles to all sites. Someone who is admin on one site might possibly be only a subscriber (or not allowed access at all) on a different site.

    Thread Starter joshyhud

    (@joshyhud)

    Is there a hook that i can use toy build a custom function for this page?

    So if multiple users selected and roles amended that the blog id associated with each user is updated?

    Moderator bcworkz

    (@bcworkz)

    It depends on what sort of UI you envision. The user list table could possibly be extended to add additional functionality, but with the limited space I’m not sure it’d make for a good UI.

    A user’s profile could be extended to give you more control over their roles on various sites.

    You could build a completely new page that offers this kind of control.

    Each user’s roles and capabilities are managed in the main site’s usermeta table. There are separate entries for each site. You would use switch_to_blog() to reach the desired site’s context, then manipulate the user’s roles and capabilities through their WP_User object’s methods as usual. Not quite the same as updating associated blog IDs like you think, though you could present such a concept in an UI but have the underlying code interpret and do the proper methods.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multisite network changing user roles’ is closed to new replies.