Hi,
I would like add a user to specific group while creating the account…Is that possible?
Thanks,
Veena
Hi,
I would like add a user to specific group while creating the account…Is that possible?
Thanks,
Veena
Hi Veena,
I’'m not sure that I do understand what you want to do. You may create a local roster using Smack but server groups are afaik not accessable from the client.
Maybe you can explain your use case, I see no need to do this while creating the account. As a server admin I would disable any XMPP account creation for users anyway.
There is the web registration plugin, it may be modified to do this.
There is the import/export plugin, I didn’‘t look at it so far so I’'m not sure if one can import new users which belong to a server group.
You could use SQL and insert the new users in the database but Wifi should be down while you are doing this.
LG
Hi,
I wanted to know if there is way to add a user to a group using SMack API?
Hi veens,
I was trying to find an answer to the same question you had, and I figured it out. I installed Spark, and while sniffing the stanzas as I added user “anoosh” to “test group”, I detected this:
Which means all you need to do is, after you’‘ve created the account using the Registration packet, send a Roster packet with this & you’'re all set.
I hope this helped.
Cheers,
-Dan.
Hi Dan,
your description and code looks like adding another user to your roster but not like adding yourself to a server-managed group. So I wonder if it helps.
LG