Expand my Community achievements bar.

SOLVED

Get the number of users of the Roster pod

Avatar

Level 2

Hello, i'm trying to display the number of users online using the Roster pod, but i can't figure out how to do it. Does anyone have any suggestion?

Regards.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Roster Pod is just an UI component that shows all the users. It will

show the users in room by default, you won't have to do anything unless

your anonymous presence is turned on.

If you want to get the users and their details, you should use

userManager.userCollection which is an ArrayCollection containing all

users. Similarly, if you want to get only hosts or only participants,

you should get userManager.hostCollection or

userManager.participantCollection and so on.

Hope this helps

Thanks

Hironmay Basu

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

Roster Pod is just an UI component that shows all the users. It will

show the users in room by default, you won't have to do anything unless

your anonymous presence is turned on.

If you want to get the users and their details, you should use

userManager.userCollection which is an ArrayCollection containing all

users. Similarly, if you want to get only hosts or only participants,

you should get userManager.hostCollection or

userManager.participantCollection and so on.

Hope this helps

Thanks

Hironmay Basu

Avatar

Level 2

Hi Hironmay, thanks for your answer. I need to show the current online users, not regarding about their roles, is there an easy way? The collections of userManager always return the number zero.

Thanks, regards.

Avatar

Level 2

Sorry it was a very newbie problem... I forgot to make my connectionSession bindable...

Your answer is right, thank you very much.

Regards.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----