GW account deleted (eDir account exists)

Should not be very difficult really:

recover deleted account from wpdomain.db

and then restore e-mails

The missing part is creation of the actual user database userxxx.db

When should this happen? What does actually create this database?

If I restore that db from backup to live PO all sorts of weird issues happen
(like empty e-mails)