Support » Plugin: Members » how do I keep the clients from creating admins?

  • I have created a new role called Recruiter that has access to users and their files. They can also add new users, but not delete, that’s it. I’ve also hidden the admin from that role’s admin panel.

    But they can create admins. This is obviously not desirable. How do I keep them from creating admins? Thanks!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Here is the answer: I found the answer and wrote about it in my blog.

    So many thanks for posting your solution here. I have checked its working. It removed the edit, delete links from users list and also removed the administrator role from dropdown to prevent promoting users to higher level.
    But one thing still there, its still able to list the administrator users in users list. What should be added more in the solution to hide the upper level admin to not come in the list on All Users -> for ex.?

    I’m not quite following. The desired outcome is to remove the administrators from the list of users on any login that is not the administrator.

    When I am logged in as an administrator, or anyone else who is an administrator is logged in, they can see the admins. If they are not admins, they cannot see any admins at all.

    Hope that makes sense.

    Yes I want ‘To remove the administrators from the list of users on any login that is not the administrator.’ Here removal means only to not able to see the administrator by other user roles.
    For example, if an editor logged-in in wp-admin he will see all users in wordpress normally, but I want a way so that other users will available in list excluding administrator (i.e. hidden administrator users).

    I hope it is clear to you now.
    By the way, I found the solution for what I want, here:
    using ‘pre_user_query’ action.

    I put this function below yours JPB_User_Caps class code and it all done in total !! 🙂
    But above function is limited to hide the particular admin using id or username. Can this converted in some way to check on basis of ‘administrator’ capability to hide all ‘administrator’ role users?
    Further I am thinking, to put this extended action inside your class or map_meta_cap function in additional switch case.. whatever ?

    Could you help me in this?

    Nice work marisqua and Shashank! Any way to extend this logic to buddypress group admins? In other words, have a local admin for each BP group that can create lower-privileged users within that group but not grant membership to other groups?

    Any way of achieving the same thing as you’re describing above with the Members plug-in?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how do I keep the clients from creating admins?’ is closed to new replies.