Prevent error on update when there is email field

This change prevents an error on update user data, when there is a form that allows to change the email. It checks if the email has changed, if yes, checks if it is in use.