Handle error response from auth modules (thanks to Eric Liang)

This commit is contained in:
Badlop 2010-05-28 01:35:59 +02:00
parent 1777ecd15a
commit a5f8aeb6da
1 changed files with 10 additions and 1 deletions

View File

@ -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