Why i can not getUserByName () after setName () for user.
it return null.
getUserByName() not working
Re: getUserByName() not working
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
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
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 46 guests