summaryrefslogtreecommitdiff
path: root/src/ejabberd_auth_mnesia.erl
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2016-11-22 14:48:01 +0100
committerChristophe Romain <christophe.romain@process-one.net>2016-11-22 14:48:01 +0100
commitfbfbb968727617ae9bbeedc9b3d4adb7636ad5da (patch)
treee48dafe80850fe41be32a3ab47f27e6e130b832b /src/ejabberd_auth_mnesia.erl
parentAdd new xmpp repo as dependency in mix.exs (diff)
Improve ODBC import
Diffstat (limited to 'src/ejabberd_auth_mnesia.erl')
-rw-r--r--src/ejabberd_auth_mnesia.erl17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/ejabberd_auth_mnesia.erl b/src/ejabberd_auth_mnesia.erl
index f36c9fbc..2e9ef5c9 100644
--- a/src/ejabberd_auth_mnesia.erl
+++ b/src/ejabberd_auth_mnesia.erl
@@ -40,8 +40,8 @@
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,
- remove_user/3, store_type/0, export/1, import/1,
- import/3, plain_password_required/0, opt_type/1]).
+ remove_user/3, store_type/0, export/1, import/2,
+ plain_password_required/0, opt_type/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
@@ -493,16 +493,9 @@ export(_Server) ->
[]
end}].
-import(LServer) ->
- [{<<"select username, password from users;">>,
- fun([LUser, Password]) ->
- #passwd{us = {LUser, LServer}, password = Password}
- end}].
-
-import(_LServer, mnesia, #passwd{} = P) ->
- mnesia:dirty_write(P);
-import(_, _, _) ->
- pass.
+import(LServer, [LUser, Password, _TimeStamp]) ->
+ mnesia:dirty_write(
+ #passwd{us = {LUser, LServer}, password = Password}).
opt_type(auth_password_format) -> fun (V) -> V end;
opt_type(_) -> [auth_password_format].