diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-04-27 17:10:50 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-04-27 17:10:50 +0300 |
commit | 9c369b7a8cdb45fe8b14f35cf98df62f4e089eef (patch) | |
tree | 26712ce04f29c614480ee0563a50086833888b89 /src/ejabberd_auth.erl | |
parent | Force ERL_PATH for elixir (diff) |
Improve detection of databases supported by modules (#1092)
Diffstat (limited to 'src/ejabberd_auth.erl')
-rw-r--r-- | src/ejabberd_auth.erl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl index 927abdac..6b7f537c 100644 --- a/src/ejabberd_auth.erl +++ b/src/ejabberd_auth.erl @@ -428,7 +428,7 @@ auth_modules() -> %% Return the list of authenticated modules for a given host auth_modules(Server) -> LServer = jid:nameprep(Server), - Default = gen_mod:default_db(LServer), + Default = ejabberd_config:default_db(LServer, ?MODULE), Methods = ejabberd_config:get_option( {auth_method, LServer}, opt_type(auth_method), [Default]), [jlib:binary_to_atom(<<"ejabberd_auth_", @@ -448,15 +448,9 @@ import(Server, riak, Passwd) -> import(_, _, _) -> pass. --spec v_auth_method(atom()) -> atom(). - -v_auth_method(odbc) -> sql; -v_auth_method(internal) -> mnesia; -v_auth_method(A) when is_atom(A) -> A. - opt_type(auth_method) -> fun (V) when is_list(V) -> - lists:map(fun v_auth_method/1, V); - (V) -> [v_auth_method(V)] + lists:map(fun(M) -> ejabberd_config:v_db(?MODULE, M) end, V); + (V) -> [ejabberd_config:v_db(?MODULE, V)] end; opt_type(_) -> [auth_method]. |