Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Using UserIDs

Avatar

Level 4

hey all

so i just wanna check this is right. getting MY and ALL userIDs like this:

var myID:String = myRoom.userManager.myUserID;
var userDesc:UserDescriptor = myRoom.userManager.userCollection[0] as UserDescriptor;

so i can find out who i am and check my permissions etc. alongside everyone else by looking at the descriptor in myRoom.userManager.userCollection. is that right? is there anywhere else i should/could be mining IDs from?

1 Reply

Avatar

Former Community Member

Hi,

Yes you are doing correctly.  UserCollection is an ArrayCollection , so you also do userCollection.getItemAt(i) as UserDescriptor to get the ith value.

UserCollection has all the user descriptors. If you want to loop over just the hosts/participants/viewer , you can also use the respective collection ie. HostCollection, ParticipantCollection or AudienceCollection respectively.


All these collections are in UserManager.

Thanks

Hironmay Basu