ejabberd - Comments for "What function/module that write oauth info (token, user etc) into mnesia in ejabberd_oauth.erl?" https://www.ejabberd.im/forum/25336/what-functionmodule-write-oauth-info-token-user-etc-mnesia-ejabberdoautherl en I can think two https://www.ejabberd.im/forum/25336/what-functionmodule-write-oauth-info-token-user-etc-mnesia-ejabberdoautherl#comment-66535 <p>I can think two possibilities:</p> <p>A) That function is not used, or is not responsible for the writting you are investigating.</p> <p>B) Your are editing the source code, but you later don't run that code. Remember to compile, copy the resulting beam file (or install) to the proper place, and restart ejabberd.</p> <p>I suspect you suffer problem B. To check what is going on, add those two logging lines. They will tell you if the module that you modify is really used by ejabberd, and also if the function is used when writting information:</p> <pre> --- a/src/ejabberd_oauth.erl +++ b/src/ejabberd_oauth.erl @@ -66,6 +66,7 @@ start() -&gt; init_db(mnesia, ?MYNAME), + ?INFO_MSG("staring Oauth", []), Expire = expire(), application:set_env(oauth2, backend, ejabberd_oauth), application:set_env(oauth2, expiry_time, Expire), @@ -181,6 +182,7 @@ associate_access_token(AccessToken, Context, AppContext) -&gt; scope = Scope, expire = Expire }, + ?INFO_MSG("associating ~p", [{AccessToken, Context, AppContext}]), mnesia:dirty_write(R), {ok, AppContext}. </pre> Wed, 27 Jan 2016 20:39:24 +0000 badlop comment 66535 at https://www.ejabberd.im