Create user in Restrict Content Pro

By: Phil Cox | Asked: 01/19/2023
ForumsCategory: Code SnippetsCreate user in Restrict Content Pro
Phil Cox asked 1 year ago
Hi All, I need to create a user in Restrict Content Pro each time a FFPro registration form is approved. I see there is a plugin to automate this, but it looks like overkill (and costly) for this one automation. Has anyone experience of doing this with a snippet? Thanks, Phil.
3 Answers
Bobby Clapp answered 1 year ago
I don't have anything that I've seen done, but surely it would be from a function here:
Phil Cox answered 1 year ago
Thanks Bobby. Looks "non-trivial". I'll explore replacing Restrict Content Pro with MemberPress, which appears to integrate with both FFPro and the Event Ticketing software in use on the site. Thanks again, Phil.
Victor Font answered 1 year ago
I looked at the restrict content pro developer docs. I couldn't find anything that defines their database schema, but I did find "there is a "memberships" database table and a "membershipmeta" database table." This means the plugin follows a standard WordPress metadata schema. You would have to examine the tables structures to know what fields are required by the plugin. You said you want to add a record to the tables after registration is approved. This implies an edit needs to take place at some point to approve the registration. If so, you could use the frm_after_update_entry hook to create the records in RCP.
Phil Cox replied 1 year ago

Very many thanks, Victor. I have proposed MemberPress as a solution instead and I'm awaiting approval to move over to that.

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