androidchatsdk / Glad App Android SDK / Gladly / setUser

setUser

fun setUser(context:Context, user:User):Unit

Sets the current user that will be logged in when communicating with Gladly. If this is set the user does not have to provide email and name.

If a userSettings has previously been set, an Error will be thrown

Parameters

context - Activity/application context to be initialized with.

user - The user settings that Gladly will use.

Exceptions

GladlyError.UserAlreadyDefined - if a user has previously been defined.

GladlyError.NotInitialized - if Gladly has not been initialized.