aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_auth_mnesia.erl
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2016-11-22 17:51:21 +0100
committerChristophe Romain <christophe.romain@process-one.net>2016-11-22 17:51:21 +0100
commitee8cc1dac2a9cfcb3e845108c42d414764c0eb64 (patch)
tree4cb3109f85fd6de2d6450f5401bf1e735406cb69 /src/ejabberd_auth_mnesia.erl
parentFix get_roster issue injected by fbfbb96 (diff)
Fix xref issue injected by fbfbb96
Diffstat (limited to 'src/ejabberd_auth_mnesia.erl')
-rw-r--r--src/ejabberd_auth_mnesia.erl15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ejabberd_auth_mnesia.erl b/src/ejabberd_auth_mnesia.erl
index 2e9ef5c94..dee3774db 100644
--- a/src/ejabberd_auth_mnesia.erl
+++ b/src/ejabberd_auth_mnesia.erl
@@ -36,7 +36,7 @@
-export([start/1, set_password/3, check_password/4,
check_password/6, try_register/3,
dirty_get_registered_users/0, get_vh_registered_users/1,
- get_vh_registered_users/2,
+ get_vh_registered_users/2, init_db/0,
get_vh_registered_users_number/1,
get_vh_registered_users_number/2, get_password/2,
get_password_s/2, is_user_exists/2, remove_user/2,
@@ -59,16 +59,19 @@
%%% API
%%%----------------------------------------------------------------------
start(Host) ->
+ init_db(),
+ update_table(),
+ update_reg_users_counter_table(Host),
+ maybe_alert_password_scrammed_without_option(),
+ ok.
+
+init_db() ->
mnesia:create_table(passwd,
[{disc_copies, [node()]},
{attributes, record_info(fields, passwd)}]),
mnesia:create_table(reg_users_counter,
[{ram_copies, [node()]},
- {attributes, record_info(fields, reg_users_counter)}]),
- update_table(),
- update_reg_users_counter_table(Host),
- maybe_alert_password_scrammed_without_option(),
- ok.
+ {attributes, record_info(fields, reg_users_counter)}]).
update_reg_users_counter_table(Server) ->
Set = get_vh_registered_users(Server),