Problem: I would like to add a registration form that allows people to claim ownership of a post. Once an admin approves their ownership, the registrant becomes author of that post.
Solution:
If I were trying to do something like this, I would follow this process:
- Create a new CPT called Pending Approvals
- Add custom fields to the Pending Approval CPT - user ID, university ID, college ID, and school ID
- Use cred_save_data to create a Pending Approval post whenever someone submits the User Registration form while trying to claim ownership of a University, College or School.
- Save the new User's ID and the appropriate University, College or School ID in the Pending Approval post
- Create a View of Pending Approval posts. In the Loop of results, include a "Delete Post" link that can be used to decline the ownership request. Also include an Edit CRED form that edits the University, College, or School. Hide or remove all the visible inputs from this form except the submit button, and give it a name like "Approve Ownership"
- Use the cred_save_data hook to update the University, College, or School post author when this form is submitted, and trash the Pending Approval post.
- Insert the View of Pending Approval posts in a page that is restricted to site administrators.
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 9 months ago.
Assisted by: Christian Cox.