mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/mod_last.erl: Added remove_user/1 function
* src/mod_configure.erl: Removing of user's stuff moved to ejabberd_auth * src/ejabberd_auth.erl: Likewise SVN Revision: 167
This commit is contained in:
parent
8a52d7cad1
commit
36157e41c9
@ -1,3 +1,11 @@
|
||||
2003-11-01 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/mod_last.erl: Added remove_user/1 function
|
||||
|
||||
* src/mod_configure.erl: Removing of user's stuff moved to
|
||||
ejabberd_auth
|
||||
* src/ejabberd_auth.erl: Likewise
|
||||
|
||||
2003-10-31 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/mod_irc/mod_irc_connection.erl: Updated to work more
|
||||
|
@ -202,7 +202,12 @@ remove_user(User) ->
|
||||
F = fun() ->
|
||||
mnesia:delete({passwd, LUser})
|
||||
end,
|
||||
mnesia:transaction(F).
|
||||
mnesia:transaction(F),
|
||||
catch mod_roster:remove_user(User),
|
||||
catch mod_offline:remove_user(User),
|
||||
catch mod_last:remove_user(User),
|
||||
catch mod_vcard:remove_user(User),
|
||||
catch mod_private:remove_user(User).
|
||||
|
||||
remove_user(User, Password) ->
|
||||
LUser = jlib:nodeprep(User),
|
||||
@ -218,6 +223,13 @@ remove_user(User, Password) ->
|
||||
end
|
||||
end,
|
||||
case mnesia:transaction(F) of
|
||||
{atomic, ok} ->
|
||||
catch mod_roster:remove_user(User),
|
||||
catch mod_offline:remove_user(User),
|
||||
catch mod_last:remove_user(User),
|
||||
catch mod_vcard:remove_user(User),
|
||||
catch mod_private:remove_user(User),
|
||||
ok;
|
||||
{atomic, Res} ->
|
||||
Res;
|
||||
_ ->
|
||||
|
@ -671,11 +671,7 @@ set_form(["config", "remusers"], Lang, XData) ->
|
||||
jlib:make_jid(Var, "", ""),
|
||||
{xmlelement, "broadcast", [],
|
||||
[{exit, "User removed"}]}},
|
||||
catch ejabberd_auth:remove_user(Var),
|
||||
catch mod_roster:remove_user(Var),
|
||||
catch mod_offline:remove_user(Var),
|
||||
catch mod_vcard:remove_user(Var),
|
||||
catch mod_private:remove_user(Var);
|
||||
catch ejabberd_auth:remove_user(Var);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
@ -805,10 +801,6 @@ set_sm_form(User, [], Lang, XData) ->
|
||||
{xmlelement, "broadcast", [],
|
||||
[{exit, "User removed"}]}},
|
||||
catch ejabberd_auth:remove_user(User),
|
||||
catch mod_roster:remove_user(User),
|
||||
catch mod_offline:remove_user(User),
|
||||
catch mod_vcard:remove_user(User),
|
||||
catch mod_private:remove_user(User),
|
||||
{result, []};
|
||||
_ ->
|
||||
{error, ?ERR_BAD_REQUEST}
|
||||
|
@ -16,7 +16,8 @@
|
||||
stop/0,
|
||||
process_local_iq/3,
|
||||
process_sm_iq/3,
|
||||
on_presence_update/1]).
|
||||
on_presence_update/1,
|
||||
remove_user/1]).
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
@ -112,3 +113,9 @@ on_presence_update(LUser) ->
|
||||
mnesia:transaction(F).
|
||||
|
||||
|
||||
remove_user(User) ->
|
||||
LUser = jlib:nodeprep(User),
|
||||
F = fun() ->
|
||||
mnesia:delete({last_activity, LUser})
|
||||
end,
|
||||
mnesia:transaction(F).
|
||||
|
Loading…
Reference in New Issue
Block a user