• I know this is probably a complicated question, but I would like to try and get an answer if it is possible.

    My client wanted a site where users would have sub-users assigned to their accounts. The Admin and Editor roles were reserved for their employees. Right now, I have set up a system where a user may sign up and other users may sign up under them in a family type account.

    I accomplished the relationship of the sub-user to the master-user by adding a field in the usermeta table that indicated the master-user UserId.

    I would like the master-user to be able to edit their sub-users user information.

    I would also like, if possible, to have the sub-users show up in the user admin menu and not just the current subscriber account.

    I would also like to accomplish all of this in the theme function file or a plugin so that I do not touch any of the core WP code.

    Any suggestions on where to start or what to do would be appreciated.

    Bob

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

    (@bcworkz)

    The user role/capability system used by WP allows for some fairly complex relationships, but they are not setup to be hierarchical. When you grant an edit capability, it applies to all posts of a certain type. If you have a limited number of master users, you might be able to make something work, but such a scheme would not scale well.

    A scalable solution would involve granting edit capability to all master users to allow WP edit functions to work for them, then add in a finer hierarchical control beyond the WP controls to only allow edits to a particular sub-group. Hopefully you can find adequate actions and filters to insert your controls within the WP system. I’m not sure this is possible to do well where all avenues are covered.

    You may have to develop your own edit forms that can enforce hierarchical constraints which operate outside of the usual WP edit forms. If coded properly, it should provide a secure editing system where no one can edit anything they are not supposed to.

    Thread Starter Bob Cristello

    (@gntmidnight)

    Thank you for your response. I agree that I will have to do form level control on allowing edits and modifications in this scenario.

    Bob

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Allowing Subscriber to edit other specific subscribers info’ is closed to new replies.