Last updated: 2 years ago
Using actionUser addon you can assign users to events. How to assign users to events.
If you also use the actionUser front-end submission form, you can set via settings so the registered user who create the event will get assigned to the event he created.
ActionUser > Event Submission Form > Assign logged-in user to event after successful event submission.
Once you have done this you can use the below code to create a calendar that will only show the events that are assigned to current logged-in user (of your site).
$user_ID = get_current_user_id();
echo do_shortcode(“[add_eventon users='”.$user_ID.”‘]”);
You can place this PHP code inside a php file in your theme template where ever you need this calendar to show.
Since ActionUser v1.8 you can do this with the below shortcode
[code][add_eventon currentuser=”yes” ][/code]
That will show events only from the current loggedin user. However this shortcode will show all the events if the user is not logged in.