On entity save, identify the user fields that have been changed I have a need to track changes to users in a separate database, apart from Drupal. When a user changes their email address or their password, I need to communicate that change with a shadow table in MSSQL.
I've created an event and listener. The event is triggered by hook_entity_update. That works fine, but I don't know what was changed in that request. Is there a way to pass the value that was changed to that event listener?
Per the hook_entity_update() documentation:

This hook runs once the entity storage has been updated. Note that hook implementations may not alter the stored entity data. Get the original entity object from $entity-&gt;original.

In your event listener, you can compare the email/password fields on $entity &amp; $entity-&gt;original to check if they have changed.