-spec is_user_exists(binary(), binary()) -> boolean().
+is_user_exists(User, <<"">>) ->
+ false;
+
is_user_exists(User, Server) ->
%% Check if the user exists in all authentications module except the module
%% passed as parameter
true; %% Account exists
{selected, [<<"password">>], []} ->
false; %% Account does not exist
- {error, unknownhost} -> false;
{error, Error} -> {error, Error}
catch
_:B -> {error, B}
case get(?STATE_KEY) of
undefined ->
case ejabberd_odbc_sup:get_random_pid(Host) of
- none -> {error, unknownhost};
+ none -> {error, <<"Unknown Host">>};
Pid ->
(?GEN_FSM):sync_send_event(Pid,{sql_cmd, Msg, now()},
?TRANSACTION_TIMEOUT)