Skip Navigation

[Geschlossen] Can I create a relationship between a Post and a User?

This support ticket is created vor 7 Jahre, 11 Monate. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 Antwort, has 2 Stimmen.

Last updated by Shane vor 7 Jahre, 11 Monate.

Assisted by: Shane.

Author
Artikel
#395768

I have an event session that I would like to relate to multiple users (speakers). Can I do this is actual WP Users, or do I need to create a shadow CPT of "person".

The use case is that I would like to let the speakers be actual users so they can log in, manage the session, upload materials, etc.

If relationships can only be between CPTs, what are best practices for what data to store where and managing that relationship? My initial thoughts would be:
1. Just have a basic User account with the correct role.
2. Have a "Person" CPT with all day-to-day fields (address, etc.). Set the author of that "Person" to be the User (so they can edit their record).
3. Set up the relationship between "Person" and "Session".

From a, Access/CRED perspective how do I manage constraining user editing of Sessions that they are assigned to? Is they were actual Users that would be easy.

#395842

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

Thank you for contacting our support forum.

First of all you are not able to create relationships between users and CPT.

However as you mentioned your best option is to create CPT called person to essentially be the users profile.

Next you will use this to create the relationship between the 2. You can use the Access plugin to manage the Session CPT where a user is unable to modify a session they are assigned to since the access permission will restrict them.

From the link below you can see how to manage the CPT using access.
https://toolset.com/documentation/user-guides/setting-access-control/

Please let me know if this helps.
Thanks,
Shane

Das Thema „[Geschlossen] Can I create a relationship between a Post and a User?“ ist für neue Antworten geschlossen.