ejabberd - Comments for "mod_register:send_registration_notifications(Mod, UJID, Source) calls ejabberd_auth_sql:is_user_exists()" https://www.ejabberd.im/forum/28901/modregistersendregistrationnotificationsmod-ujid-source-calls-ejabberdauthsqlisuserexist en Let me show you my code in https://www.ejabberd.im/forum/28901/modregistersendregistrationnotificationsmod-ujid-source-calls-ejabberdauthsqlisuserexist#comment-67603 <p>Let me show you my code in ejabberd_auth_sql.erl :</p> <pre> ----------------------------------------------------------------------------------------------------- %% @spec (User, Server) -&gt; true | false | {error, Error} is_user_exists(User, Server) -&gt; LServer = jid:nameprep(Server), LUser = jid:nodeprep(User), if (LUser == error) or (LServer == error) -&gt; false; (LUser == &lt;&lt;&gt;&gt;) or (LServer == &lt;&lt;&gt;&gt;) -&gt; false; true -&gt; ?INFO_MSG("* * * EJABBERD_AUTH_SQL:IS_USER_EXISTS * * * | USER : ~p", [LUser]), try sql_queries:get_password(LServer, LUser) of {selected, [{_Password}]} -&gt; ?INFO_MSG("* * * EJABBERD_AUTH_SQL:IS_USER_EXISTS | RESULSET : ~p",[_Password]), true; %% Account exists {selected, []} -&gt; ?INFO_MSG("* * * EJABBERD_AUTH_SQL:IS_USER_EXISTS | ACCOUNT DOES NOT EXIST", []), false; %% Account does not exist {error, Error} -&gt; {error, Error} catch _:B -&gt; {error, B} end end. -------------------------------------------------------------------------------------------------------------------------------- </pre><p>After ran mod_register:send_registration_notifications() in the debug shell here is what is shown in the shell </p> <pre> 09:06:53.821 [info] * * * EJABBERD_AUTH_SQL:IS_USER_EXISTS * * * | USER : &lt;&lt;"dev23"&gt;&gt; 09:06:53.861 [info] * * * EJABBERD_AUTH_SQL:IS_USER_EXISTS | RESULSET : &lt;&lt;"qWOm6JSdMxCgRgaF+Q2r3yGrTFI="&gt;&gt; --------------------------------------------------------------------------------------------------------------------------------- </pre><p>And the message is sent to dev23.<br /> Note : i am using ejabberd-17.04.41</p> Mon, 24 Jul 2017 02:09:00 +0000 dev23 comment 67603 at https://www.ejabberd.im I cannot reproduce. I add https://www.ejabberd.im/forum/28901/modregistersendregistrationnotificationsmod-ujid-source-calls-ejabberdauthsqlisuserexist#comment-67597 <p>I cannot reproduce.</p> <p>I add debug lines in ejabberd_auth_sql.erl, so I see in logs when those functions are called. Then I start ejabberd in live mode, so I get an Erlang shell, and login an admin user. Then I execute this call:</p> <pre> mod_register:send_registration_notifications(mod_register, {jid,&lt;&lt;"user34"&gt;&gt;,&lt;&lt;"localhost"&gt;&gt;,&lt;&lt;&gt;&gt;,&lt;&lt;"user34"&gt;&gt;,&lt;&lt;"localhost"&gt;&gt;,&lt;&lt;&gt;&gt;}, {127,0,0,1}). </pre><p>I see no activity in ejabberd_auth_sql module</p> Fri, 21 Jul 2017 10:20:30 +0000 badlop comment 67597 at https://www.ejabberd.im