Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to do user_exist(UserID)

Hinne
Level 3
Level 3

How can I check if a user exists by UserID? I tried

     Session.userManager.canUserConfigure(UserID);

but it throws an error


Error: MessageManager.getRootUserRole - This user doesn't exist.
    at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::getRootUserRole()
    at com.adobe.rtc.sharedModel::CollectionNode/getRootUserRole()
    at com.adobe.rtc.sharedModel::CollectionNode/getUserRole()
    at com.adobe.rtc.sharedModel::CollectionNode/canUserConfigure()
    at com.adobe.rtc.sharedManagers::UserManager/canUserConfigure()
    at SimpleChat/onSessionSyncChange()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.adobe.rtc.session::ConnectSession/checkManagerSync()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.adobe.rtc.sharedManagers::UserManager/userReceivedOrEdited()
    at com.adobe.rtc.sharedManagers::UserManager/onItemReceive()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.adobe.rtc.sharedModel::CollectionNode/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItem()
    at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItem()
    at com.adobe.rtc.session.managers::SessionManagerBase/receiveItem()

1 Accepted Solution
aponnusa
Correct answer by
Employee
Employee

Hi,

UserManager has an API called getUserDescriptor(p_userID).

This API check if the userId exists in that collection.

Thanks

Arun

View solution in original post

2 Replies
Raff_
Employee
Employee

Can you explain what you mean by "if a user exists" ? Where ? In you service ?

LCCS can only tell you if a user is logged in the room you are connected to (by looking at the user list in UserManager, for example).

If the user exists in your system but didn't enter the room LCCS will know nothing about it. For this use case you should call some service on your application server (the only place that should have knowledge of users in your system)

aponnusa
Correct answer by
Employee
Employee

Hi,

UserManager has an API called getUserDescriptor(p_userID).

This API check if the userId exists in that collection.

Thanks

Arun

View solution in original post