mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Correctly support cache tags in ejabberd_auth
This commit is contained in:
parent
0789a145fc
commit
7c45b52c86
@ -613,7 +613,10 @@ db_user_exists(User, Server, Mod) ->
|
||||
case Mod:user_exists(User, Server) of
|
||||
true -> {ok, exists};
|
||||
false -> error;
|
||||
{error, _} = Err -> Err
|
||||
{error, _} = Err -> Err;
|
||||
{CacheTag, true} -> {CacheTag, {ok, exists}};
|
||||
{CacheTag, false} -> {CacheTag, error};
|
||||
{_, {error, _}} = Err -> Err
|
||||
end
|
||||
end) of
|
||||
{ok, _} ->
|
||||
@ -643,10 +646,10 @@ db_check_password(User, AuthzId, Server, ProvidedPassword,
|
||||
fun() ->
|
||||
case Mod:check_password(
|
||||
User, AuthzId, Server, ProvidedPassword) of
|
||||
true ->
|
||||
{ok, ProvidedPassword};
|
||||
false ->
|
||||
error
|
||||
true -> {ok, ProvidedPassword};
|
||||
false -> error;
|
||||
{CacheTag, true} -> {CacheTag, {ok, ProvidedPassword}};
|
||||
{CacheTag, false} -> {CacheTag, error}
|
||||
end
|
||||
end) of
|
||||
{ok, _} ->
|
||||
|
Loading…
Reference in New Issue
Block a user