User Managment Auditing

I would like to add information into the audit table when users are edited or added. Under the onSaveUser extension function on the User Management component is there a way to compare the new values to the old ones? The only way I have found is to do something like this to see the differences

old = system.user.getUser('default', user.get('username')).getContactInfo()
new = user.getContactInfo()

Is this a reliable way to do it or is there a better way?