Expand my Community achievements bar.

Passing data during login, setCustomUserField

Avatar

Level 3
Hello AFCS team, (i preferred cocomo tho, easier to remember)



I can see that using setCustomUserField (p_userID:String,
p_fieldName:String, p_value:*) it is possible to set fields for my
user. But that is only possible if i know p_userID in advance. What
i would like to do is pass user fields data when i setup the room
with the webserver. Since i am creating a session key only for some
defined users.

Is there a way to do this on the server side or should i make
my client do a getSomeInfoForMyUsername http request on my server
to fetch the datat once the flex client is connected to cocomo
before calling setCustomUserField ?



Thanks,



Greg

2 Replies

Avatar

Former Community Member


Hi Greg,



Nothing like this yet. How would you like this to work?
Currently, all user details come from the loginReceived RTMP event,
which comes directly from whatever is supplied to the service
during authentication. We haven't looked at how we could bridge
that with custom user fields yet.



For now, your solution makes sense. We'll consider making
this smoother in future releases.



thanks

nigel

Avatar

Level 3
Hi nigel,



Maybe when we get the auth key for a user we could also make
a call with the session manager on this user to attach some data
related to this user.

Once the user login he could receive the loginReceived event
carrying the extra data for this uer in a dic ?



The need to pass data when preparing room was just to add
some details to the users using the platform. their firstname,
lastname, mail etc since these fields are known at the time of the
room creation, passing them could be handy.



Greg