25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix call to deprecated ejabberd_config:get_myhosts() (#3000)

This commit is contained in:
Badlop 2019-08-22 17:56:08 +02:00
parent 12c4dfd955
commit 94d50a447d
2 changed files with 2 additions and 2 deletions

View File

@ -265,7 +265,7 @@ get_auth_admin(Auth, HostHTTP, RPath, Method) ->
get_auth_account(HostOfRule, AccessRule, User, Server, get_auth_account(HostOfRule, AccessRule, User, Server,
Pass) -> Pass) ->
case lists:member(Server, ejabberd_config:get_myhosts()) of case lists:member(Server, ejabberd_config:get_option(hosts)) of
true -> get_auth_account2(HostOfRule, AccessRule, User, Server, Pass); true -> get_auth_account2(HostOfRule, AccessRule, User, Server, Pass);
false -> {unauthorized, <<"inexistent-host">>} false -> {unauthorized, <<"inexistent-host">>}
end. end.

View File

@ -545,7 +545,7 @@ is_user_in_group(US, Group, Host) ->
%% @spec (Host::string(), {User::string(), Server::string()}, Group::string()) -> {atomic, ok} | error %% @spec (Host::string(), {User::string(), Server::string()}, Group::string()) -> {atomic, ok} | error
add_user_to_group(Host, US, Group) -> add_user_to_group(Host, US, Group) ->
{_LUser, LServer} = US, {_LUser, LServer} = US,
case lists:member(LServer, ejabberd_config:get_myhosts()) of case lists:member(LServer, ejabberd_config:get_option(hosts)) of
true -> add_user_to_group2(Host, US, Group); true -> add_user_to_group2(Host, US, Group);
false -> false ->
?INFO_MSG("Attempted adding to shared roster user of inexistent vhost ~s", [LServer]), ?INFO_MSG("Attempted adding to shared roster user of inexistent vhost ~s", [LServer]),