mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-08 21:43:07 +02:00
Handle error response from auth modules (thanks to Eric Liang)
This commit is contained in:
parent
fbc8466c3c
commit
9275a0020e
|
@ -340,7 +340,16 @@ get_password_with_authmodule(User, Server)
|
|||
is_user_exists(User, Server) when is_list(User), is_list(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)).
|
||||
|
||||
%% @spec (Module, User, Server) -> true | false | maybe
|
||||
|
|
Loading…
Reference in New Issue
Block a user