Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong role is shown for user added to subsite on a multisite #325

Closed
MannyAdumbire opened this issue Dec 19, 2022 · 2 comments
Closed

Wrong role is shown for user added to subsite on a multisite #325

MannyAdumbire opened this issue Dec 19, 2022 · 2 comments

Comments

@MannyAdumbire
Copy link

I added someone with the "Administrator" Role.
Simple history says:
Created user xxx with role subscriber

I confirmed they were correctly added as an Administrator and are shown as an Administrator on the Users screen.

To Reproduce
Steps to reproduce the behavior:

  1. Got to Users on a subsite of a multisite-enabled WordPress install.
  2. Select Add New
  3. Fill in any user details and give them an "Administrator" Role.
  4. From admin menu select Simple History

Expected behavior
For Simple history to say:
Created user xxx with role administrator

System information (please complete the following information):

  • WordPress version: 6.1
  • PHP version: 8.0.26
@bonny
Copy link
Owner

bonny commented Dec 27, 2022

Thanks for the bug report @MannyAdumbire. I was able to reproduce this, so it's a bug.

@bonny
Copy link
Owner

bonny commented Jun 27, 2023

Probably due to this in ms-functions.php:

// Newly created users have no roles or caps until they are added to a blog.
delete_user_option( $user_id, 'capabilities' );
delete_user_option( $user_id, 'user_level' );

@bonny bonny closed this as completed in 3ebc390 Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants