powered by Jive Software

Import buddy list into JiveRoster - FIXED

Hi I’'ve a problem working with roster. If I use a client ( gaim, jwchat …) to add a “buddy” to my account all is working fine. The problem is when I try to import the buddies from one of our mysql tables to JiveRoster table.

I use the follow php to make the test

<?php $link = mysql_connect("localhost", "tolo","wamba"); mysql_select_db("wamba",$link); $sql = "select a.strnickname from tblus_profile a inner join tblus_friends b on a.tblus_profileid=b.intfriendid where intuserid=''180'' "; $result = mysql_query($sql); while ($row = mysql_fetch_row($result)){ $sql2="insert into jiveRoster (username,jid,sub,ask,recv,nick) values(''$row[0]'',''ballbrk@tolo-laptop'',3,-1,-1,''ballbrk'')"; echo $sql2; $result2 = mysql_query($sql2); $sql3="insert into jiveRoster (username,jid,sub,ask,recv,nick) values(''ballbrk'',''$row[0]@tolo-laptop'',3,-1,-1,''$row[0]'')"; echo $sql3; $result3 = mysql_query($sql3); } ?>

When I run this script to import the contacts seems that all contacts are imported correctly , but when I log with my jabber account, I can’'t see any buddy.

Could you help me?

Message was edited by: ballbrk

Hi ballbrk,

You’'re running into the caching issue which has tripped up a number of people in the past (do a search of these forums for details). To fix the issue you can either restart Openfire or log into the Admin Console and navigate to Server -> Server Manager -> Cache Summary, select the Roster Cache and click on the Refresh button.

Hope that helps,

Ryan

All is working fine thanks. The problem was that JID can’'t have spaces, then I change space with _ and now all is working fine