We are running Drupal 7. When a user uploads a new image, the image saves and displays correctly.
When a user logs out, the image disappears from the profile, but remains in the images folder.
We traced the problem back to logout action somehow setting the "picture" column in the users table to 0 immediately after logout.
The trouble is, I cannot find this where in the code this happens. I found a user_logout function, but that does not do it.