]> granicus.if.org Git - ejabberd/commitdiff
Swap 'mnesia' and 'internal' types correctly
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 30 Mar 2015 09:25:25 +0000 (12:25 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 30 Mar 2015 09:25:25 +0000 (12:25 +0300)
src/ejabberd_auth.erl

index 4fd127d2b34e6d5ad6d81ddd571fb356118c9675..9985dd3de1a2fac53642a715a88f22c8ad967061 100644 (file)
@@ -425,6 +425,10 @@ auth_modules() ->
 %% Return the list of authenticated modules for a given host
 auth_modules(Server) ->
     LServer = jlib:nameprep(Server),
+    Default = case gen_mod:default_db(LServer) of
+                 mnesia -> internal;
+                 DBType -> DBType
+             end,
     Methods = ejabberd_config:get_option(
                 {auth_method, LServer},
                 fun(V) when is_list(V) ->
@@ -432,7 +436,7 @@ auth_modules(Server) ->
                         V;
                    (V) when is_atom(V) ->
                         [V]
-                end, [gen_mod:default_db(LServer)]),
+                end, [Default]),
     [jlib:binary_to_atom(<<"ejabberd_auth_",
                            (jlib:atom_to_binary(M))/binary>>)
      || M <- Methods].