_server.getUserByChannel()
Availability:
SmartFoxServer PRO 1.4.0
Usage:
_server.getUserByChannel(socketChannel)
Description:
Finds the User object from its socket channel.
Properties:
none |
Returns:
the User object
Example:
var usr = _server.getUserByChannel(channelObj) trace("User name: " + usr.getName())
Notes:
This command is useful when handling a custom login
event. When the event is fired the socket channel of the client is passed.
After you've successfully logged in the client you can get its User object
using this method.
See also: