0
votes

I am new to ejabberd and erlang and have created a basic application that first checks that whether the user has login or not. So basically it checks the mnesia table of login and confirms this.

Now I saw that ejabberd also has a registration process for users as inejabberdctl register username host password and I since I was using sql authentication I saw that there is a table named users which has all the users and the password stored.

I wanted to know the flow of sequence that how these values get stored there and was hoping to use it to push these values of username and password into my mnesia table for login.

I had a look at ejabberd developer guide and found that mod_register handles the registration of a new user but I could not trace down exactly what function is getting used inside it to do all the proceedings.

I was using the method of writing info messages to the logs. Can anybody help me on this? Thanks in advance.

1
To be more specific I checked that whenever I register a new user from command line then I am not able to track the presence of mod_register but if I am using a client(Pidgin) then I can see mod_register being called.Anyone having any Idea about why this is happening.abhishek ranjan

1 Answers

0
votes

ejabberd_auth module is reponsible for user registration mod_register call ejabberd_auth:try_register/3 function and ejabberd_auth:try_register/3 call these modules (ejabberd_auth_sql, ejabberd_auth_riak, ejabberd_auth_mnesia, ejabberd_auth_external, ejabberd_auth_anonymous and ejabberd_auth_pam). These modules also have function try_register/3.The module ejabberd_auth calls these module according to setting of ejabberd configuration file auth methods (internal, external, odbc etc.).

So study these modules and function to understand flow of ejabberd registration.

Sample  flow