Use custom users table for eJabberd
Regardless of what tables exist (or not) and what content they have, ejabberd will use only the one you define in auth_method, as mentioned in the Authentication documentation:
auth_method: internal
ejabberd will use the 'passwd' table in the Mnesia internal database.
auth_method: sql
ejabberd will use the 'users' table in the SQL database that you configured.
auth_method: external
ejabberd will use the extauth script.
auth_method: [sql, external]
ejabberd will first attempt to use sql. If that fails, it will use external. I don't know the details here, and found no documentation, fortunately you don't need to do this.
In other words, how can I tell ejabberd to use my custom app table for all users operations instead of its default table?
Now the answer is simple:
auth_method: external