protected boolean hasPrincipalRegisteredMultifactorAuthenticationDevice(final RequestContext requestContext) throws Throwable {
        val query = WebUtils.getPasswordManagementQuery(requestContext, PasswordManagementQuery.class);
        val principal = resolvedPrincipal(query.getUsername());
        val provider = selectMultifactorAuthenticationProvider(requestContext, principal);
        LOGGER.debug("Selected multifactor authentication provider [{}]", provider.getId());
        return provider.getDeviceManager() == null || provider.getDeviceManager().hasRegisteredDevices(principal);
    }
Build the reset URL for the user.
support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/actions/SendPasswordResetInstructionsAction.java