Closed
Description
The user key used in certain log entries reflects the directory user record. Elements of the key - username, domain, email - can be updated by the after_mapping_hook. When any key element is updated, the key used in log messages is not updated. This can cause confusion - see #362.
Before writing the key to the logger, we should update it to reflect the umapi record. We don't necessarily need to update the key itself, which is used in internal data structures. At the very least, we should modify its representation when adding it to logs (perhaps with a new lookup table).