User relationships, Ultimate Member, UM Relationships

I would like to create a plugin/code that would assist in a small project that i have. I have a portal that i would like to incorporate user relationship and permissions functionality. So if user A has some documents they’ve added, And nominate user B and C to come register on the site, then user A will have user B & C as their secondary users that will only be able to view user A’s documents. User B must be able to View and Download those documents but user C will only get read only access. It must not be limited to just having 2 user below the parent user but multiple users with multiple permission settings that user A can determine upon nomination. I have also added this as a job if anyone would like to assist.

  • Predrag Dubajic

    Hey Musa Madalane,

    Hope you're doing well today :slight_smile:

    I must say that I'm not familiar with a tool that could do this for you out of the box, however there could be possible solution with our Membership 2 plugin.

    What you could do with it is create two membership, one for user B and one for user C, enable invitation codes for both memberships and send those to desired users so they can register for their membership.

    After that you can create page for user A documents and add read only and editable documents there.
    Now protect read only part so it's visible only for C membership and protect editable part so it's available for membership B.

    Would something like that work for you?

    Best regards,
    Predrag

    • Musa Madalane

      Hi Predrag Dubajic,

      I have used the Membership 2 plugin and it's amazing. Pity the client wasn't paying the hosting bill.

      The issue is having the relationships with those users, a seamless registration method for the first user and then having them send the invites to users they would like to see their content.

      How would I achieve that without having to manually go into user accounts and editing the permissions? For instance i would like many user A's having multiple users view that content, but also be segregated from other A users. like a closed community for user A to showcase their work to just the users they have invited to view/download that work.

      I hope that makes sense.

  • Adam Czajczyk

    Hello Musa Madalane!

    With Membership 2 Pro you would need to setup multiple memberships so for each "user A" and related "sub-users" (B and C) there would have to be a separate set of memberships A, B and C.

    The "separate users" memberships are not supported out of the box and I must say I'm also not aware of any ready-to-use tool that would let you achieve such setup.

    However, I think this could be achieved with Membership 2 Pro but would require some custom development. The Membership 2 Pro features an API that could be used to "automate" setting up memberships so I'm thinking of a workflow like this:

    1. there's a "general" membership that's available for signup
    2. any user that signs up for it is considered "A-type" member so upon signup a custom developed code:
    - creates set of memberships "usernameA - A", "usernameA - B" and "usernameA -C"
    - sets up a page for user A (by copying a "reference page" and just replacing B and C membership names)
    - creates invitation codes for user A

    The setup would basically be what my colleague Predrag suggested but also would be "self-replicating" so each "user A" would have his/her own page protected with own memberships.

    This however would be quite complex and would require some custom coding based on native WP functions and Membership 2 Pro API (documented in plugin on "Membership 2 -> Help -> API Docs" page) so you may want to post a question about it on our "Jobs & Pros" job board (please note: no WPMU DEV staff involved!) here:

    https://premium.wpmudev.org/wordpress-development/

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.