how to exclude ejabberd_auth_sql from is_user_exists

Hello,
I am trying to exclude ejabberd_auth_sql from ejabberd_auth:is_user_exist function

%% Check if the user exists in all authentications module except the module
%% passed as parameter
%% @spec (Module::atom(), User, Server) -> true | false | maybe

Please giving an example how to pass the module as parameter.

Thanks.

You cannot do this. The only

You cannot do this. The only way to accomplish this is to merge functions from ejabberd_auth_sql and another ejabberd_auth_* file (from where you want is_user_exists function to be called) into a single file like ejabberd_auth_my and use auth_method: my

But what is this about ? I

But what is this about ? I thought it mentioned to exclude any Module:is_user_exists by passed *SOMETHING* as parameter.

ejabberd_auth.erl :
----------------------------

is_user_exists(User, Server) ->
%% Check if the user exists in all authentications module except the module
%% passed as parameter
%% @spec (Module::atom(), User, Server) -> true | false | maybe
    lists:any(fun (M) ->
		      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~nError message: ~p",
				       [M, User, Server, Error]),
			    false;
			Else -> Else
		      end
	      end,
	      auth_modules(Server)).
Syndicate content