Change Password

Change a user's password on their account.

Android

/**
* @return Boolean - with few exceptions this method should always succeed and will simply return successfully
* this bool which determines whether or not there were minor problems encountered along the way.
*/
fun changePassword(email: String, currentPassword: String, newPassword: String): VsLiveData<Boolean>
val email: String = "[email protected]"
val password: String = "password"
  
SDK.Account.changePassword(email, password)
  .observe(object : VsObserver<Boolean>() {
    override fun onError(error: Throwable) {
    }

    override fun onChanged(t: Boolean) {
    }
})

iOS

/// - Parameters:
///   - email: Email for account in need of password change
///   - currentPassword: The current password for the account
///   - newPassword: The new password desired by the user
///   - newPasswordConfirmation: A confirmation copy of `newPassword` (must match `newPassword`)
///   - completionHandler: This closure will return a Bool value indicating the success or failure of the call
changePassword(email: String, currentPassword: String, newPassword: String, newPasswordConfirmation: String,
                                           completionHandler: @escaping VersusApiResponse<VersusStatus>)
}