* src/odbc/odbc_queries.erl: Added users_number/1 function
* src/ejabberd.cfg.example: Added an example for
pgsql_users_number_estimate option
+ * src/mod_stats.erl: Updated
+ * src/web/ejabberd_web_admin.erl: Likewise
* src/ejabberd_auth_anonymous.erl: Added anonymous_purge_hook
(thanks to Christophe Romain and Mickael Remond)
get_local_stat(Server, [], Name) when Name == "users/total" ->
LServer = jlib:nameprep(Server),
- case catch ejabberd_auth:get_vh_registered_users(Server) of
+ case catch ejabberd_auth:get_vh_registered_users_number(Server) of
{'EXIT', Reason} ->
?STATERR("500", "Internal Server Error");
- Users ->
- ?STATVAL(integer_to_list(length(Users)), "users")
+ NUsers ->
+ ?STATVAL(integer_to_list(NUsers), "users")
end;
get_local_stat(_Server, [], Name) when Name == "users/all-hosts/online" ->
OnlineUsers =
length(ejabberd_sm:get_vh_session_list(Host)),
RegisteredUsers =
- length(ejabberd_auth:get_vh_registered_users(Host)),
+ ejabberd_auth:get_vh_registered_users_number(Host),
?XE("tr",
[?XE("td", [?AC("../server/" ++ Host ++ "/", Host)]),
?XC("td", integer_to_list(RegisteredUsers)),
get_stats(Host, Lang) ->
OnlineUsers = length(ejabberd_sm:get_vh_session_list(Host)),
- RegisteredUsers = length(ejabberd_auth:get_vh_registered_users(Host)),
+ RegisteredUsers = ejabberd_auth:get_vh_registered_users_number(Host),
[?XAE("table", [],
[?XE("tbody",
[?XE("tr", [?XCT("td", "Registered Users:"),