• Has anyone seen a good way (in code) to limit the number of users of certain roles? I want to be able to limit based on user role per site.

    So, each site can have e.g.

    • 1 admin
    • 2 editors
    • 10 subscribers

    This should ideally work at user registration, add user and user promotion (by admin in the user management menu).

    I found this suggestion but it only covers when registering a new user:
    https://wordpress.stackexchange.com/questions/110036/limiting-the-number-of-users

    Any suggestions would be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Tim Nash

    (@tnash)

    Spam hunter

    If your happy with the code from the link, you can would need to adapt it, to return all the current users for each role and count then block.

    That said, a role isn’t as fixed as it seems in the admin interface, and are more a way of giving users capability rather then groups, you might be better off looking at some of the simple membership or group plugins and managing the users by group rather then role?

    Thread Starter zagreus

    (@zagreus)

    Hi Tim,

    Could you elaborate on what you mean with this a little more? Sounds like I’m overlooking something.

    That said, a role isn’t as fixed as it seems in the admin interface

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Manage Number of Users (based on role)’ is closed to new replies.