Batch Create: Users Role Not Added To Site

I'm using WP 3.2.1.

I've added 15 users to a site via Batch Create. I gave them all the role of "Author."

When I look at the Network Dashboard > Users, I see that each user is associated with the proper site.

However, when I switch to Site Admin Dashboard > Users, it only displays 2 of the 15 users. Yet, the "All" filter at the top of the page has the proper user count by it; the "Authors" filter also displays the proper count at 15. Yet, all 15 users do not appear in the Users list.

Upon login, the users that are not displayed in the Site Admin Dashboard > Users, receive a notice "You do not have sufficient permissions to access this page." This means they aren't being treated as "Authors" because they can't access the dashboard to manage their posts.

I've tried deleting the users and re-creating them, but it has no effect.

Does anyone have any suggestions?

  • Philip John
    • DEV MAN’s Apprentice


    Can you tell me what happens if you create a brand new user in Site Admin > Users > Add New? Are they able to access the dashboard?

    How about if you add them from Network Admin > Users > Add New and then assign them to the site afterwards?

    You say that two of the 15 do display in the Site Admin properly. Does logging in with them work? What's different about those users?

    Let me know about those and then we'll go from there.... we might need to look into your database so you'll need access to phpMyAdmin or similar (perhaps through your hosting control panel).


  • Carol
    • New Recruit

    Creating a brand new user in Site Admin > Users > Add New allows them to access the dashboard.

    However, trying to add an existing user (one who is already supposed to be an Author) results in the following message: "That user is already a member of this site."

    Adding from Network Admin > Users > Add New and assigning them to the site afterward works perfectly. (This is how I got those 2 users to appear--that's what's different about them. Yes, logging in with them works)

    I have db access, so I have no problem reviewing the table data.

  • Carol
    • New Recruit

    Looking at the db tables, wp_usermeta, indicates the Batch Create plugin may have failed to properly normalize the meta-data.

    For instance, the role was entered into the excel spreadsheet with a leading capital letter: "Author." This setting was added to the wp_usermeta table into the wp_[n]_capabilities field (where 'n' is the blog id) as "Author." It should have been normalized to lowercase and added as "author".

    Also, the proper user level for the blog was not written to wp_usermeta. Using Batch Create, the entry wp_[n]_user_level was entered as 0. The entry may need to be set to 2.

    Manually adjusting the wp_[n]_capabilities field to the lowercase role ensures the user is displayed in the Site Admin Dashboard > Users view.
    I'm not sure yet whether the wp_[n]_user_level has to be set to 2. I'll have to test.

    Can the developers at WPMU Dev dig into the Batch Create and verify this error? If so, please supply a update/patch. Is data normalization during batch creating users handled by the plugin or by wordpress core?

  • Philip John
    • DEV MAN’s Apprentice

    For instance, the role was entered into the excel spreadsheet with a leading capital letter: "Author."

    Ah-ha I suspect that's the cause then. Can you try the import using all lowercase for the user role please?

    the entry wp_[n]_user_level was entered as 0. The entry may need to be set to 2.

    It's logical that would be the case as it'll be based on "Author" which it doesn't comprehend.

    You should be using lowercase for your batch file anyway but I'll ask the developer to add a catch in as well to fish this out in future.


  • Vladislav
    • Dead Eye Dev


    First off, thank you for troubleshooting the problem so well yourself - and yes, the user role capitalization is exactly what caused the problem. Since the role names are case-sensitive, the assigned roles weren't understood by the WordPress. This caused the users not to display as they should and, more importantly, the user levels weren't assigned properly either.

    As Phil said, the role fields should be lowercased in the batch file - however, this scenario can happen very easily, since spreadsheet editors tend to auto-capitalize fields. In the latest release (v1.1.4, just released), the plugin enforces lowercase values for user roles.

  • Philip John
    • DEV MAN’s Apprentice


    As we haven't heard back from you we're going to assume the problem was sorted out and mark this thread as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and, as always, for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.