Page 1 of 1

User.getId value on USER_LOGIN

Posted: 26 Jul 2017, 09:46
by ApolloMeijer
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

Re: User.getId value on USER_LOGIN

Posted: 26 Jul 2017, 10:19
by Lapo
{ 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

Re: User.getId value on USER_LOGIN

Posted: 26 Jul 2017, 10:59
by ApolloMeijer
Oke thanks, I found a workaround for it so we are good now!