@Override
    public UserPropertyProvider getUserPropertyProvider(String username)
    {
        UserPropertyProvider nonReadOnly = null;
        for (final UserPropertyProvider provider : getUserPropertyProviders())
        {
            try
            {
                provider.loadProperties(username);
                return provider;
            }
            catch (UserNotFoundException unfe)
            {
                Log.debug("User {} not found by UserPropertyProvider {}", username, provider.getClass().getName());

                if (nonReadOnly == null && !provider.isReadOnly()) {
                    nonReadOnly = provider;
                }
            }
        }

        // User does not exist. Return a provider suitable for creating user properties.
        if (nonReadOnly == null) {
            throw new UnsupportedOperationException();
        }

        return nonReadOnly;
    }
Returns the first provider that contains the user, or the first provider that is not read-only when the user
does not exist in any provider.

@param username the username (cannot be null or empty).
@return The user property provider (never null)
xmppserver/src/main/java/org/jivesoftware/openfire/user/property/HybridUserPropertyProvider.java