Home › Forums › Ticket Products › Event Tickets Plus › Give access to attendees for a specific WP role
- This topic has 9 replies, 4 voices, and was last updated 9 years, 8 months ago by
Aurélien.
-
AuthorPosts
-
July 5, 2016 at 12:42 am #1135354
Aurélien
ParticipantHi,
we are looking for a way to give access to the list of attendees for an event. Let say we have set an organiser and we’d like to provide an access to view the participants.
I tried to find a capacity in order to create a specific WordPress role but I can’t find it.
Can you help me?
Thanks
July 5, 2016 at 8:49 am #1135480Brook
ParticipantHowdy Aurélien,
I would love to help you try and find a solution here.
Let say we have set an organiser and we’d like to provide an access to view the participants. I tried to find a capacity in order to create a specific WordPress role but I can’t find it.
WP Roles would apply equally to all of the events. So if you give one organizer the ability to access Attendee pages for an event, they could then access the attendee page for any event including ones they are not party to. Is this what you want? Or are you trying to give this organizer access to only specific events like in this feature request?
Cheers!
– Brook
July 5, 2016 at 11:23 am #1135657Aurélien
ParticipantHi Brook,
thanks for your assistance. In fact, I’m looking for a way to provide list of attendees to a specific WP user. They have to login into the WP back-office and then see only their event. A quick link could give them access to the list. Is that clear for you?
July 6, 2016 at 12:28 am #1135872Brook
ParticipantThat is very clear, thank you.
What you want is possible with our current API, but it will take a decent amount of dev work to accomplish. First you (or your developer) will want to familiarize yourself with Tribe__Events__Community__Tickets__Main::generate_routes(). This function is hooked into ‘wp_router_generate_routes’. You will notice it adds the ‘attendees-report’ route which is simply:
new Tribe__Events__Community__Tickets__Route__Attendees_Report( $router );That class, Tribe__Events__Community__Tickets__Route__Attendees_Report, is what imposes requirements on who can view this page. You could extend this class and then hook into ‘wp_router_generate_routes’ yourself and replace the ‘attendees-report’ route this.
Now that you have you own class handling the routes you can override any restrictions. You might set it so that a random token when appended to the URL allows a user to access this page. Something like example.com/events/community/attendees/event/1123/?token=a98sd7fds922kd would allow you to give access only to people you share the link with. Or, if the organizer is registered on your site you could check if they have access to this event, perhaps via a custom field on the Organizert that specifies User IDs with access. It’s up to you.
Of course if you are not a developer you might just be interested in voting on that feature request. This is certainly something we might be interested in building in the future.
Cheers!
– Brook
July 6, 2016 at 12:31 am #1135874Aurélien
ParticipantThanks for your great explanation. I’ll see how to code this feature by myself. Anyway, where can I vote for this feature request? 🙂
July 7, 2016 at 8:15 am #1136508Brook
ParticipantYou are very welcome.
The feature request can be found here: https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/9790851-community-allow-each-of-the-multiple-organizers
In spite of its relatively low vote count we are definitely considering building it. I can not speak for the strategist who plans such things, but to me it seems more like a question of “when” not “if”. I appreciate your voting on it as that helps us decide when. 🙂
Let me know if you need anything else. Cheers!
– Brook
July 7, 2016 at 8:20 am #1136510Aurélien
ParticipantThat would be awesome! Thanks!
Just voted!
July 7, 2016 at 1:00 pm #1136842Brook
ParticipantAwesomesauce!
I’ll leave this open for a couple of weeks just in case you have any questions about the Router, should you go that route.
It’s been a pleasure, Aurélien.
- Brook
July 22, 2016 at 9:35 am #1142987Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Give access to attendees for a specific WP role’ is closed to new replies.
