0

I am trying to setup a chat messanger using xmpp and smack.

I am able to connect,login

m_connection.connect();
SASLAuthentication.supportSASLMechanism("PLAIN", 0);
m_connection.login(userName, password);

Also I am able to create new users as admin.

AccountManager ac = m_connection.getAccountManager();
ac.createAccount(user, password);

The only thing that is missing in my cycle is when a client wants to register for the first time. How does the admin user get a notification/request for creating a new user. Is there any listener that I might have missed?

Thanks!

user1163234
  • 2,407
  • 6
  • 35
  • 63
  • I'm unsure what you mean? Are you saying you want to approve new users in your code? Or that you want to be verified when a new user registers AND comes online? In this case why don't you just listen for when new users come online? – BeRecursive Oct 18 '12 at 10:23
  • Sorry for the misunderstanding. I am assuming that When a new client wants to join my xmpp server I first need to create a user for him before he can login.How does the new user send a request to create a new user? – user1163234 Oct 18 '12 at 11:01
  • 2
    You just provide them with a registration form and then use the ``createAccount`` method as you have done in your example. – BeRecursive Oct 18 '12 at 11:18

1 Answers1

2

You just provide them with a registration form and then use the createAccount method as you have done in your example.

BeRecursive
  • 6,286
  • 1
  • 24
  • 41