[ejabberd] disable unregistration

Konstantin Khomoutov flatworm at users.sourceforge.net
Sun Apr 24 02:55:50 MSD 2011

On Sun, Apr 24, 2011 at 12:26:37AM +0200, Badlop wrote:

> > Is it possible to disable user unregistration (deletion), when I use mnesia?
> Not configurable, but easy to disable in the source code:
> --- a/src/mod_register.erl
> +++ b/src/mod_register.erl
> @@ -160,7 +160,7 @@ process_iq(From, To,
>                               jlib:make_jid(User, Server, Resource),
>                               jlib:make_jid(User, Server, Resource),
>                               jlib:iq_to_xml(ResIQ)),
> -                           ejabberd_auth:remove_user(User, Server),
> +                           %% ejabberd_auth:remove_user(User, Server),
>                             ignore;
>                         _ ->
>                             IQ#iq{type = error,
This code cries to include to return IQ error on that path instead of
just doing nothing.  I don't know whether it's done in some other place
(by the caller?) but if this change will just make attempted removals to
be just ignored, that would be a violation of RFC.  So it seems the hack
should be a bit more involved.

Anyway, it would be cool to actually see a use case for this kind of
behaviour.  I hardly can imagine a service in which a user is able to
register, is able to change their password but is unable to delete their

More information about the ejabberd mailing list