custom login parameters

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

creat326
Posts: 87
Joined: 13 Jun 2010, 09:50

custom login parameters

Postby creat326 » 19 Mar 2011, 19:51

Hi

I'm trying to send custom parameters into the server upon logging in, so I have this on the client:

ISFSObject tr = new SFSObject();
tr.PutUtfString("version", SmartFoxManager.Version);
smartFox.Send(new LoginRequest(SmartFoxManager.email, SmartFoxManager.password, SmartFoxManager.zone, tr));

Now I'm trying to capture that "version" on the server side, but no luck. I have this on the server side:

ISFSObject obj=(ISFSObject)event.getParameter( SFSEventParam.LOGIN_IN_DATA);
if (obj!=null) {
version=obj.getUtfString("version");
}

but it doesn't get it. Am I missingn something? is it not LOGIN_IN_DATA ?
shaulbehr
Posts: 24
Joined: 15 May 2011, 11:00

Postby shaulbehr » 30 Jun 2011, 14:31

Hey, I'm trying to do the same thing now. You haven't had a reply since MARCH ?? :shock: Did you find the solution?
Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

Postby Alex » 01 Jul 2011, 05:38

Hi
I think the LOGIN_IN_DATA is available only in the event SFSEventType.USER_LOGIN, if you want to read it in onother event perhaps SFSEventType.USER_JOIN_ZONE - you should pass it from the USER_LOGIN to the USER_JOIN_ZONE event in parameter SFSEventParam.SESSION.

Hope it helps
shaulbehr
Posts: 24
Joined: 15 May 2011, 11:00

Postby shaulbehr » 03 Jul 2011, 06:28

Thanks, I got it working!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 120 guests