I used the "Custom Database Integration Guide":
http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integ ration-guide.html
And the "Building the Source" to modify and compile the source:
http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/source-b uild.html
My openfire.jar will not be useful for you because I changed other things. But I'm sending it and the GroupManager.java(/Openfire/src/java/org/jivesoftware/openfire/group/GroupManager.java).