When resetting a password, a password reset email is sent to the address provided, if that address exists in the Karhoo directory. The user password can the be reset by following the link provided in the email.
resetPassword(email: String) : Call<Void>
Parameters
user's email address
email
: string
Returns
callback with user’s object
Call
: Void
Errors
None
Examples
iOS
let userService = Karhoo.getUserService()
userService.passwordReset(email: "[email protected]")
.execute { result in
if result.isSuccess() {
print("Password reset sent")
} else if error = result.errorValue() {
print("Failed with error: \(error.code) \(error.message)")
}
}
Android
val userService = KarhooApi.userService
userService.resetPassword(email = "[email protected]").execute { result ->
when (result) {
is Resource.Success -> print(result.data) // Handle data
is Resource.Failure -> print(result.error, userInfo) //Handle errors
}
}