User.getId value on USER_LOGIN

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

Moderators: Lapo, Bax

ApolloMeijer
Posts: 58
Joined: 16 Aug 2012, 10:05

User.getId value on USER_LOGIN

Postby ApolloMeijer » 26 Jul 2017, 09:46

Hey guys!

Is it possible that I can get the User.getId variable from this object
http://docs2x.smartfoxserver.com/api-do ... /User.html

in the USER_LOGIN handler? I know I can get it from the USER_JOIN_ZONE but I lost my parameters there.

thanks
User avatar
Lapo
Site Admin
Posts: 19599
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: User.getId value on USER_LOGIN

Postby Lapo » 26 Jul 2017, 10:19

{ This thread was moved to the right section, under SFS2X }

Hi,
no the USER_LOGIN handler runs way before a User object is created, so there's no way to access the id of an object that has yet to be created.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
ApolloMeijer
Posts: 58
Joined: 16 Aug 2012, 10:05

Re: User.getId value on USER_LOGIN

Postby ApolloMeijer » 26 Jul 2017, 10:59

Oke thanks, I found a workaround for it so we are good now!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 17 guests