powered by Jive Software

Administering Groups Programmatically

I’m working on some code that will automatically assign users to various groups. Everything seems to work fine as long as the group is not shared. See the XML below for an example of the XMPP request/response. Notice that the 1st example works fine. User “ahalsup” is successfully added to the “test” group. The 2nd example, I’ve changed the “test” group to be shared. Now you’ll see that the request to add “ahalsup” to the “test” group is not honored. I’m using OpenFire 3.6.3. What am I doing wrong? Thanks.


Group “test” defined normally

OnWriteText:



Everyone
test


OnReadText:



test
Everyone



Group “test” shared to all users

OnWriteText:



Everyone
test


OnReadText:



Everyone


What is the proper way to manage users and groups programmatically?

Please Help!

I’m also trying to do the same thing - are you writing a plugin to handle this IQ message?

I wrote those inforamtion to the openfire database directly, but seems not working because openfire cached the groups and their memebers information in the memory, I have to restart the openfire to pick up the newly added group and its members… Did you find a way already?

We decided not to go down this route in the end, we decided that using groups wasn’t really right for what we were trying to do. These is actually a plugin you should check out for user administration in the plugins section, it allows you to administer the groups via HTTP requests rather than through XMPP. The security on it isn’t amazing by the plugin author’s own admission but they do encourage you to extend it.

Hope that helps.