We want to build a membership site for an association. Users can register and administer their data. They will have a public profile and can sign up for events.
I have two questions about how to set this up:
1. We would like to have as much information as possible within the user profile itself (by adding user fields). This makes it easier for the administration to handle the data and e. g. export it or sync it to MailChimp. However, as far as I understand it, for a public profile, you would usually create a new CPT where each post is connected to one user and when adding information to their profile, the users are actually editing that post and not their user account itself. Would it be an option to instead us the author page for that purpose instead and stick with user fields only?
The reasoning behind using custom posts for user profiles instead of just adding user meta is that Toolset custom search works with posts only, not with users.
Also Types relationships work between posts of different types, you cannot have relationships between posts and users.
If you don't need to offer user searches and you don't need to connect your users to posts using Types relationships, then there would be no need to create profile posts.
(There is a built-in kind of "relationship" between posts and users, namely that users can be the authors of posts, which is how you would connect a user to a profile post.)
If you were to go down the route of using profile posts connected to users, you could store most of the user data as part of the user profile. You would only need to store fields that should be searchable on the profile posts.
For example, if you had a "favourite team" field, if you wanted your users to be able to search for other users whose favourite team was Liverpool, then you would need to make that field a post field, not a user field.
Regarding exporting user data, what tool would you be using for this? You could create Views to display such data (events attended by users), but Toolset doesn't provide a means to export such data.
Thanks for explainig this in detail! In that case separate profiles are the way to go as we need searchable fields.
For the export: Having a "Download" button next to a view that displays all participants would be pretty nice. I assume this is possible by adding some custom code. For now we would use WP All Import / WP All Export to do that via backend. But according to this thread, there seems to be no option to filter the participants of a certain event, right? (--> https://toolset.com/forums/topic/relationship-post-data-export-to-csv/)
You can't filter by fields of a related post (e.g. the start date of an event) but you can filter for posts connected to another post, e.g. for profile posts connected to the "launch party" event.
Just insert a post relationship filter for the relationship in question.