Posted: August 9, 2019 at 3:42 am
$events = EE_Registry::instance()->load_model(‘Event’)->get_all(); How to get event list which on user1 have registered? |
|
Fatal error: Class EventEspresso\core\services\collections\Collection contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ArrayAccess::offsetExists) in \event-espresso-core-reg\core\services\collections\Collection.php on line 19 Also we face this issue on plugin. |
|
Hi there,
As mentioned multiple times previously, EE support will not simply hand over code snippets to help with customizations. Why? One reason is exactly what is happening here. We give you a snippet for your issue and you move on to the next issue, then request another snippet and another, and another, until we are writing more code than you are for your customizations. Officially, Event Espresso does not support customizations at all and the answer would simply be to hire a developer that will take the time to understand how to do what you need to do. However, we (support) have been fairly flexible on this and we’ve given multiple examples for people (including yourself) to work from but again there does come a point when our recommendation will simply be to hire a competent developer. I’ve linked you to the docs multiple times now, to pull the data you need to pull you need to take the time to understand the model system and how data relates to each other. You’re using the Event model and users make registrations, registrations are linked to an attendee. So to pull your data your first need the attendee ID, how you get that is up to you as it depends on your use case (the attendee ID is the EE_Contact ID btw). Then you’d do something like:
Again, you need to get the ATT_ID for you user for this to work. If you need further help with this you’ll need to contact a developer, we recommend the folks at codeable.
Which version number of Event Espresso are you running? Which version of PHP is running on the server? Have you modified any file within the plugin? Are you hooking into EE with any customizations? |
|
I am a developer but I can’t find an all options for arguments. I have clear I have need events list which logged user has registered. |
|
Sorry but I don’t understand this, can you rephrase? If you are asking what is happening at index 0 of the array then the first element of the array passed to the model system is always an array of ‘where’ conditions for the query, which is explained in the model documentation.
Are you using the WP user integration add-on? Has the user always registered with details matching their wp user account? EE doesn’t store the ID of the WP user that created a registration so you can’t just reference the current user. |
|
Tony, Yes we have purchase this plugin, If this one sequre for public i will update my account key? Just Simple : When x user logged in account there has an idea which event on x has registered. |
|
I’m sorry but I don’t understand this, update your account key? I’m asking if you have been using that add-on on the site already?
That’s not as simple as it seems. Did both of those register onto the events using details that matched their WP User profile data (First Name, Last Name, email) exactly?
It sounds like you want the My Events section of the WP user integration add-on. https://eventespresso.com/wiki/wp-user-integration/#ee4-my-events However, it will only show registrations that have been made which matched the user profile data exactly. — Did you fix the PHP fatal error issue? |
|
The support post ‘How to get user register based events list?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.