I tried to use getParentExtension().getParentZone().getUserByName("abc") but it is null while there exists a user named "abc". But with "sfsadmin" it's not null. help me!!!
Sorry for my English
can't use getUserByName(). it is null
Re: can't use getUserByName(). it is null
( I have moved the message in the proper section, this is relative to SFS2X )
Your english is fine
As regards the problem, can you reproduce it with any user name?
Please specify which server version you're using.
Thanks
Your english is fine
As regards the problem, can you reproduce it with any user name?
Please specify which server version you're using.
Thanks
Re: can't use getUserByName(). it is null
My server version is 2.12.0. Before getUserByName("abc") i got is setName("abc") for the previous user.
Re: can't use getUserByName(). it is null
while after set name = "abc" u3 and u2 null?
Re: can't use getUserByName(). it is null
Users can't be renamed like that.
The user name is chosen at login time and never changed during runtime.
Thanks
The user name is chosen at login time and never changed during runtime.
Thanks
Re: can't use getUserByName(). it is null
Thank you, I will try another way
Re: can't use getUserByName(). it is null
If you want to assign a user name that is different from what the user sends at login time you can use this:
http://docs2x.smartfoxserver.com/Gettin ... wtos#item3
See point #4 -> "Change the user name at login time"
hope it helps
http://docs2x.smartfoxserver.com/Gettin ... wtos#item3
See point #4 -> "Change the user name at login time"
hope it helps
Who is online
Users browsing this forum: No registered users and 108 guests