Creating a user list based on user IDs

Permalink
Hi there

I'm fairly new in making own code in concrete5, so I could use some help! :)

I have a reference table with event IDs and user IDs. I would like to fetch the names of all users on a givent event.

I have the two necessary IDs:

[
UserID: $u->getUserID();
EventID: $c->getCollectionID()


How can I make a loop in a view.php page, that creates a list of all names of the users signed up for an event?

Example: I would like to have the names of the users with user ID 1 and 4, because they have signed up for event 221 (see attached image).

Expected result on my page: John Doe, Jane Doe

I hope someone can help me.

Thanks.

 
jwulff replied on at Permalink Reply 1 Attachment
Attached file.

The name is in the user attribute Name (handle: name)