Packagecom.smartfoxserver.v2.entities.managers
Interfacepublic interface IUserManager
Implementors SFSUserManager

The IUserManager interface defines all the methods and properties exposed by the client-side manager of the SmartFoxServer User entities.

In the SmartFoxServer 2X client API this interface is implemented by the SFSUserManager class. Read the class description for additional informations.

See also

SFSUserManager


Public Properties
 PropertyDefined By
  userCount : int
[read-only] Returns the total number of users in the local users list.
IUserManager
Public Methods
 MethodDefined By
  
containsUser(user:User):Boolean
Indicates whether a user exists in the local users list or not.
IUserManager
  
containsUserId(userId:int):Boolean
Indicates whether a user exists in the local users list or not from the id.
IUserManager
  
containsUserName(userName:String):Boolean
Indicates whether a user exists in the local users list or not from the name.
IUserManager
  
getUserById(userId:int):User
Retrieves a User object from its id property.
IUserManager
  
getUserByName(userName:String):User
Retrieves a User object from its name property.
IUserManager
  
getUserList():Array
Get the whole list of users inside the Rooms joined by the client.
IUserManager
Property Detail
userCountproperty
userCount:int  [read-only]

Returns the total number of users in the local users list.


Implementation
    public function get userCount():int
Method Detail
containsUser()method
public function containsUser(user:User):Boolean

Indicates whether a user exists in the local users list or not.

Parameters

user:User — The User object representing the user whose presence in the users list is to be tested.

Returns
Booleantrue if the passed user exists in the users list.
containsUserId()method 
public function containsUserId(userId:int):Boolean

Indicates whether a user exists in the local users list or not from the id.

Parameters

userId:int — The id of the user whose presence in the users list is to be tested.

Returns
Booleantrue if the passed user exists in the users list.

See also

containsUserName()method 
public function containsUserName(userName:String):Boolean

Indicates whether a user exists in the local users list or not from the name.

Parameters

userName:String — The name of the user whose presence in the users list is to be tested.

Returns
Booleantrue if the passed user exists in the users list.

See also

getUserById()method 
public function getUserById(userId:int):User

Retrieves a User object from its id property.

Parameters

userId:int — The id of the user to be found.

Returns
User — The User object representing the user, or null if no user with the passed id exists in the local users list.

See also

getUserByName()method 
public function getUserByName(userName:String):User

Retrieves a User object from its name property.

Parameters

userName:String — The name of the user to be found.

Returns
User — The User object representing the user, or null if no user with the passed name exists in the local users list.

See also

getUserList()method 
public function getUserList():Array

Get the whole list of users inside the Rooms joined by the client.

Returns
Array — The list of User objects representing the users in the local users list.