<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_email(strategy, details, user=None, *args, **kwargs):
 """Update the user's email address using data from provider."""

    if user:
        email = details.get('email')

        if email and user.email != email:
            user.email = email
            strategy.storage.user.changed(user)