Expand my Community achievements bar.

SOLVED

How to do user_exist(UserID)

Avatar

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

Avatar

Correct answer by
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

Avatar

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)

Avatar

Correct answer by
Employee

Hi,

UserManager has an API called getUserDescriptor(p_userID).

This API check if the userId exists in that collection.

Thanks

Arun