2

I want to delete a chat account and at the same time :

  1. Delete his roster
  2. Delete him from all of his friends rosters

How can i do this?

I have tried the various options of ejabberdctl. I can unregister a user, and even purge his roster, but I cant find a way to remove him from other rosters.

PS : All my users are currently on one server/host

Zombo
  • 1
  • 62
  • 391
  • 407
Adil
  • 395
  • 1
  • 5
  • 14

2 Answers2

0

If you save the roster data in mnesia (mod_roster) and not in an external database (mod_roster_odbc), then mod_admin_extra:delete_rosteritem/4 might help you to delete the user's roster. Otherwise you will have to use odbc_queries functionality.

If the user's contacts are your users as well (no s2s connections allowed), then you might use delete_rosteritem with swapped arguments, or use mnesia/odbc hackery. In a federated setup you will not have access to the contact's roster, but you can probably send his server both, an presence unsubscribe and a presence unsubscribed stanza. See RFC 3921 or ask for detail.

Unfortunately, I do not know a ready-to-use solution, but might come up with one in the following weeks.

Zombo
  • 1
  • 62
  • 391
  • 407
andi5
  • 1,606
  • 1
  • 11
  • 10
0

Usually deleting a user will unsubscribe them from all the local user's rosters, as well as send remote users unsubscribe requests through the server-to-server component. You may want to look at ad-hoc commands, which ejabberd supports. This way you can script a tool to do it from the command line, which is what it looks like you want from your question tags.

The web admin UI may be a popular place to do it. I know that is where I've done it with openfire.

Zombo
  • 1
  • 62
  • 391
  • 407
A. R. Diederich
  • 1,110
  • 9
  • 10