aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_auth.erl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2010-05-28 01:35:59 +0200
committerBadlop <badlop@process-one.net>2010-05-28 01:36:19 +0200
commita5f8aeb6da74658f020a11b840a0e0eeb7970f38 (patch)
tree8cb5cf16061a97a3162709a8645fd155a2ba69bc /src/ejabberd_auth.erl
parentMakefile with optional ejabberd_debug.erl compilation (EJAB-1242) (diff)
Handle error response from auth modules (thanks to Eric Liang)
Diffstat (limited to 'src/ejabberd_auth.erl')
-rw-r--r--src/ejabberd_auth.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl
index 4ee39d15c..30ef97685 100644
--- a/src/ejabberd_auth.erl
+++ b/src/ejabberd_auth.erl
@@ -251,7 +251,16 @@ get_password_with_authmodule(User, Server) ->
is_user_exists(User, Server) ->
lists:any(
fun(M) ->
- M:is_user_exists(User, Server)
+ case M:is_user_exists(User, Server) of
+ {error, Error} ->
+ ?ERROR_MSG("The authentication module ~p returned an "
+ "error~nwhen checking user ~p in server ~p~n"
+ "Error message: ~p",
+ [M, User, Server, Error]),
+ false;
+ Else ->
+ Else
+ end
end, auth_modules(Server)).
%% Check if the user exists in all authentications module except the module