@Override
    public String findPhone(final PasswordManagementQuery query) {
        val findPhone = casProperties.getAuthn().getPm().getJdbc().getSqlFindPhone();
        if (StringUtils.isBlank(findPhone)) {
            LOGGER.debug("No SQL query is defined to retrieve phone numbers");
            return null;
        }
        try {
            return this.transactionTemplate.execute(action -> {
                val phone = this.jdbcTemplate.queryForObject(findPhone, String.class, query.getUsername());
                if (StringUtils.isNotBlank(phone)) {
                    return phone;
                }
                LOGGER.debug("Username [{}] not found when searching for phone", query.getUsername());
                return null;
            });
        } catch (final EmptyResultDataAccessException e) {
            LOGGER.debug("Username [{}] not found when searching for phone", query.getUsername());
            return null;
        }
    }
This is {@link JdbcPasswordManagementService}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-pm-jdbc/src/main/java/org/apereo/cas/pm/jdbc/JdbcPasswordManagementService.java