User profile picture

Drupal 7: User profile picture image suddenly gone or reset? Check your user_save() calls!

Drupal 7: User profile picture image suddenly gone or reset? Check your user_save() calls!

Just a simple but important hint today: If your user profile picture images are suddenly gone mysteriously, you should check your calls to user_save in custom modules or contributed modules.

The reason can be found in this Core issue: https://www.drupal.org/node/935592

You HAVE TO user_load() the full user object before user_save() it again, otherwise profile values are being reset.