user id problem

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Rutter
Posts: 99
Joined: 12 Dec 2007, 16:21
Location: Canada
Contact:

user id problem

Postby Rutter » 16 Sep 2014, 03:41

I have a custom login and I assign a id # to myUserId in the extension response handler. After joining a room and checking the userlist I find that the user ids from the room userlist do not match the id's Ive assigned. Rechecking myUserId verifys that my id is still correct just not in the room user list. Because of this I get errors when trying to use setUserVariables and receiving updates on other users.

Is there something I haven't set properly to allow the userlist to have an accurate user id?
Rutter
Posts: 99
Joined: 12 Dec 2007, 16:21
Location: Canada
Contact:

Re: user id problem

Postby Rutter » 25 Sep 2014, 02:04

Apparently, no help here. Did I miss something in the docs? Anyone?
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: user id problem

Postby Ninjaoninja2 » 26 Sep 2014, 04:12

Rutter wrote:I have a custom login and I assign a id # to myUserId in the extension response handler. After joining a room and checking the userlist I find that the user ids from the room userlist do not match the id's Ive assigned. Rechecking myUserId verifys that my id is still correct just not in the room user list. Because of this I get errors when trying to use setUserVariables and receiving updates on other users.

Is there something I haven't set properly to allow the userlist to have an accurate user id?

I'm having the same problem unfortunately i can't really help but your not alone.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: user id problem

Postby zachofthegolden1 » 29 Sep 2014, 02:51

Rutter wrote:I have a custom login and I assign a id # to myUserId in the extension response handler. After joining a room and checking the userlist I find that the user ids from the room userlist do not match the id's Ive assigned. Rechecking myUserId verifys that my id is still correct just not in the room user list. Because of this I get errors when trying to use setUserVariables and receiving updates on other users.

Is there something I haven't set properly to allow the userlist to have an accurate user id?



The smartfoxserver will always use diffrent id's for logins. The best way to have their username as the id and a seperate way of displaying their name.

On my extensions i set the login to update the datebase to a field named temp_id everytime i login. then if there is an extension needing ot refur to a user it can read the temp id there given for that session and read their real database id along with anything else thats needed.


When i did that i was able ot have a field named "name" so the username is their database ID and their name is changeable but this can be very complicated with diffrent games and code. My game logs in using facebook so the id thing is good to use. for typing there might be an issue. If i had soem idea on how it works for your game i might be able to come up with something.
-ZG1

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 27 guests