Allow multiple users to edit post - NOT user role based?

By: Chris Bryce | Asked: 12/24/2023
ForumsCategory: How-toAllow multiple users to edit post - NOT user role based?
Chris Bryce asked 4 months ago

HI all, newbie here.


I have a requirement to allow multiple users to edit posts but the permissions cannot come from their user role, but must instead come from whether they are sub-accounts of a MemberPress corporate membership.


I know this is very niche, but I wondered if anyone had come across this before or if anyone had any bright ideas as to how it might be achieved?


TIA ChrisB

3 Answers
Rob LeVineRob LeVine answered 4 months ago
I'm not sure what you mean by "edit a post", however, if you mean a user's form entry, you can use the frm_user_can_edit hook
Victor Font answered 4 months ago
If I'm not mistaken, Memberpress Corporate Accounts use the parent company's email address with all subaccounts. For subaccounts, the parent is stored in the mepr_parent field. You have to test the value of this field to ensure the correct users are enabled for the functionality to which you grant them.
Cemil Alyanak answered 2 months ago

Similar requirement. I need to have users that are assigned to a specific event (entries on a form separate from their personal profile form). So imagine Prom Dance 2024 is the event, there are three teachers assigned to the prom and I need them all to be able to edit the prom 2024 entry, but not other teachers, who are still in the system, but are not organizers of this prom. Thoughts? Thx. Cemil

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community