powered by Jive Software

Can't manually add users to MUC-rooms in MySQL


I have Openfire with MySQL DB.

There are many users and MUC-rooms.

I need to add users to MUC-rooms (with “Members only” access) via MySQL queries.

I create records in ofMucAffiliation for moders and in ofMucMember for members.

But newly added users still can’t enter to these Rooms!

It seems that they are still not members of these rooms!

I tried to clear the Openfire’s cache from admin panel, but it doesn’t change anything.

It works ONLY after I restart Openfire server! But I can’t restart server every time I add some user to some room!

Please, explain, what I need to change in Openfire’s DB to give my users access to rooms.

P.S. These are my sql-queries:

INSERT INTO kosteg_openfire.ofMucMember (roomID, jid, nickname, email)

(SELECT nid as roomID, CONCAT(‘web’,og_uid.uid,’@infocrm.net’) as jid, name as nickname, mail as email FROM kosteg_webinar.og_uid INNER JOIN kosteg_webinar.users ON og_uid.uid=users.uid WHERE is_admin=0);

INSERT INTO kosteg_openfire.ofMucAffiliation (roomID, jid, affiliation)

(SELECT nid as roomID, CONCAT(‘web’,uid,’@infocrm.net’) as jid, 20 as affiliation FROM kosteg_webinar.og_uid WHERE is_admin=1);