25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

prevent from calling get_vh_registered_users/2 when not available

SVN Revision: 1871
This commit is contained in:
Christophe Romain 2009-02-13 15:01:55 +00:00
parent bf82bac328
commit e977d099e2
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-02-13 Christophe Romain <christophe.romain@process-one.net>
* src/ejabberd_auth.erl: prevent from calling
get_vh_registered_users/2 when not available
2009-02-06 Jean-Sébastien Pédron <js.pedron@meetic-corp.com> 2009-02-06 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/web/ejabberd_web.erl, src/web/ejabberd_http.erl: Add * src/web/ejabberd_web.erl, src/web/ejabberd_http.erl: Add

View File

@ -242,7 +242,13 @@ get_vh_registered_users(Server) when is_list(Server) ->
get_vh_registered_users(Server, Opts) when is_list(Server) -> get_vh_registered_users(Server, Opts) when is_list(Server) ->
lists:flatmap( lists:flatmap(
fun(M) -> fun(M) ->
M:get_vh_registered_users(Server, Opts) case erlang:function_exported(
M, get_vh_registered_users_number, 2) of
true ->
M:get_vh_registered_users_number(Server, Opts);
false ->
M:get_vh_registered_users_number(Server)
end
end, auth_modules(Server)). end, auth_modules(Server)).
%% @spec (Server) -> Users_Number %% @spec (Server) -> Users_Number