This Question is Answered

2 "helpful" answers available (5 pts)
1 Replies Last post: May 11, 2008 8:08 PM by Gaston Dombiak  
xiangzhaozeng Bronze 1 posts since
May 9, 2008
Currently Being Moderated

May 10, 2008 12:10 AM

show all user

 

hello, I am  a chianese student . Now I  use  openfire3_4_3 and smack3_0_4 API  developing a client. I want  to show all  JUser  from my local server,but i don't know to do it .it is when i  add buddy,  i  can  see   all  user  on my  the local server.  i want your answer.  thank you.

 

 

Gaston Dombiak Jiver 3,736 posts since
Sep 26, 2001
Currently Being Moderated
May 11, 2008 8:08 PM in response to: xiangzhaozeng
Re: show all user

Hey xiangzhaozeng,

 

In XMPP a client should not be able to ask the server for the list of registered users. That would be a huge security breach. Adding someone to your roster is a way to keep track of the presence of your contacts. As you noticed you need to know the JID (i.e. address) of the user to add him to your roster.

 

If your goal is to populate rosters with list of users on the server then you should take a look at shared groups. You can define a group with all the users in the system and configure it to be public so that all clients will see that group and its members.

 

There is also an ad-hoc command that admins may send to the server to get information about users in the system.

 

Regards,

 

  -- Gato

More Like This

  • Retrieving data ...