getUserByName() not working

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
khanhdev
Posts: 13
Joined: 24 Mar 2017, 11:32

getUserByName() not working

Postby khanhdev » 21 Jun 2017, 07:55

Why i can not getUserByName () after setName () for user. :? :?
it return null.
User avatar
Lapo
Site Admin
Posts: 19432
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: getUserByName() not working

Postby Lapo » 21 Jun 2017, 13:57

Please do not call setName() on a user object.

User names cannot be changed at runtime: they are unique and decided at login time exclusively.
If you wish to alter the username of a specific client it can be done a login time as described in this article:
http://smartfoxserver.com/blog/how-to-c ... stom-login

Also as a general rule always use the server API entry point to find the methods you're looking for:
http://docs2x.smartfoxserver.com/Extens ... ension-api

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 2 guests