mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
ejabberd_auth:remove_user/2 always returns ok
This commit is contained in:
parent
0da2107974
commit
d74f02e367
@ -306,19 +306,16 @@ is_user_exists_in_other_modules_loop([AuthModule|AuthModules], User, Server) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
%% @spec (User, Server) -> ok | error | {error, not_allowed}
|
%% @spec (User, Server) -> ok
|
||||||
%% @doc Remove user.
|
%% @doc Remove user.
|
||||||
%% Note: it may return ok even if there was some problem removing the user.
|
%% Note: it may return ok even if there was some problem removing the user.
|
||||||
remove_user(User, Server) ->
|
remove_user(User, Server) ->
|
||||||
R = lists:foreach(
|
lists:foreach(
|
||||||
fun(M) ->
|
fun(M) ->
|
||||||
M:remove_user(User, Server)
|
M:remove_user(User, Server)
|
||||||
end, auth_modules(Server)),
|
end, auth_modules(Server)),
|
||||||
case R of
|
ejabberd_hooks:run(remove_user, jlib:nameprep(Server), [User, Server]),
|
||||||
ok -> ejabberd_hooks:run(remove_user, jlib:nameprep(Server), [User, Server]);
|
ok.
|
||||||
_ -> none
|
|
||||||
end,
|
|
||||||
R.
|
|
||||||
|
|
||||||
%% @spec (User, Server, Password) -> ok | not_exists | not_allowed | bad_request | error
|
%% @spec (User, Server, Password) -> ok | not_exists | not_allowed | bad_request | error
|
||||||
%% @doc Try to remove user if the provided password is correct.
|
%% @doc Try to remove user if the provided password is correct.
|
||||||
|
Loading…
Reference in New Issue
Block a user