'Checks that auth provider allows password changes and current_password
matches.'

def check_change_password(self, user, current_password):

    for (provider, options) in self.active_authenticators(user.email, user.username, current_password):
        if (provider is None):
            log.debug(('Unable    to    find    module:    %s' % options))
        else:
            auth_result = provider.authenticate_user(user, current_password, options)
            if (auth_result is True):
                if _get_bool(options, 'allow-password-change', False):
                    return (True, '')
                else:
                    return (False, 'Password    change    not    supported.')
            elif (auth_result is None):
                break
    return (False, 'Invalid    current    password.')
