changePassword

Change password for existing user

This function changes the password of the customer whose Id is passed in the parameters. It checks if the currentPassword is correct and if so changes the users password to the one passed in newPassword parameter, newPassword must be at least 6 characters long and not longer than 25.

func changePassword(userId: String, currentPassword: String, newPassword: String, completion: @escaping (Bool, String) -> ()) {
}