Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

custom user info revisited

Avatar

Level 3
I posted a topic recently about setting user information when
a user logs in but have not been able to get it or work. Thanks
Nigel for the suggestion and code for using shared model. I created
two .as files called userdec.as and userdecevent.as. I have had
trouble sending the information back and forth from the flex app as
I am not a strong coder. I do think it is an impotant part of cocmo
though to be able to share additional information about users.



I have an app already created that uses the php login method
and takes the user name from a text box. I also want the user to
inclued there location and select an avatar.



Could anyone suggest code functions from flex for setting
these using Nigle's shared code?



Thanks
1 Reply

Avatar

Former Community Member
Hi,



We have fixed the issue in the SDK and will updated in next
build. However, what problems you are facing with the code the
Nigel sent ? If you look at the code he sent, there is a
setCustomUserDetail method, all other info you want to send should
be put in the p_detail Object parameter that you use to call the
function.

For e.g. userName you can directly set through the
setUserDisplayName api in UserManager . For any additional fields
like localtion , avator, you need to create a object like

var obj:Object = new Object();

obj.location = "your location" ;

obj.avatar = "your avator" ;



and then called setCustomUserDetail (userID,obj) API in the
shared model class nigel gave. And you should look at the
onItemReceive function in that sharedmodel class, and see if you
have received those custom values and once you do, you can dispatch
an event and use them.

For any API, the only other thing you need to userID of the
user for whom you are sending the info. You can get that from the
UserManager. Hope this helps.



Thanks

Hironmay Basu