getLoggedInUser()
method. This method can also be used to check if the user is logged in or not. If the method returns nil
, it indicates that the user is not logged in and you need to log the user into CometChat SDK.
User
object containing all the information related to the logged-in user.
UsersRequest
class. To use this class i.e to create an object of the UsersRequest class, you need to use the UsersRequestBuilder
class. The UsersRequestBuilder
class allows you to set the parameters based on which the users are to be fetched.
The UsersRequestBuilder
class allows you to set the below parameters:
setSearchKeyword()
. By default the keyword is searched in both UID & Name.
status => name => UID
. If name
is pass to the sortBy()
method the user list will be sorted by name => UID
.
UsersRequest
class, you need to call the fetchNext()
method. Calling this method will return a list of User
objects containing n number of users where n is the limit set in the builder class.
getUser()
method.
getUser()
method takes the following parameters:
Parameter | Description |
---|---|
UID | The UID of the user for whom the details are to be fetched. |
User
objects.