# Users

class Users

The user service.

This class allows performing user related actions such as, given a string, searching for those that contain some field that matches it.

#### Parameters

rx

Access to the reactive API of the service.

## Properties

rx
Link copied to clipboard
val rx: UsersRx

## Functions

addListener
Link copied to clipboard
fun addListener(listener: UserListener)

Adds a listener to receive user events.

getUserBy
Link copied to clipboard
fun getUserBy(id: String, onCompletion: (Either<User, SippoResourceError>) -> Unit)

Searches for the user who have an id that matches the specified id.

getUserByUri
Link copied to clipboard
fun getUserByUri(userUri: String, onCompletion: (Either<User, SippoResourceError>) -> Unit)

Searches for the user who have an Uri that matches the specified userUri.

getUsersBy
Link copied to clipboard
fun getUsersBy(identifier: String, onCompletion: (Either<List<User>, SippoResourceError>) -> Unit)

Searches for users who have any field that matches the specified identifier.

removeListener
Link copied to clipboard
fun removeListener(listener: UserListener)

Removes the specified listener.