Best way to capture ALL users

So.... I am wanting to add ALL users added to Virtualmin, whether server owners, or, email users, to be captured and added to another database outside Virtualmin (likely databases, first one is just support ticket system).

The data I need is:

email address (full)
Unix User Name
Real Name
Password
Custom Fields

And, I need to capture all changes, deletions. Obviously, I can write the script to do that IF I have the data.

Last I tested this, it seemed I could not find all this data very easily. I could run the after script for server owners, and, I think all the data was there. But, that does not run for email users, only the webmin after script runs, and that doesn't have all this data.

===
Separate issue while I am thinking of it - can you add a custom field type EMAIL address, so it can be sort of validated?

Status: 
Closed (fixed)

Comments

You can get a list of all domains with the command virtualmin list-domains --multiline and all users in a domain with the command virtualmin list-users --domain whatever.com --multiline