I have 2 extra profile types setup using profile 2. When I edit and save one of these additional profiles the user picture in the main user account vanishes and is deleted from the default/files/pictures folder.

I have tried setting up the user avatar as a separate image field in the user profile but the same thing happens.

Has any one else noticed this?

Comments

benjohnstone’s picture

This is a problem for me also. subscribing!

gurojoh’s picture

Same for me!

gc11’s picture

Same here, subscribing

-------------------------------------------------
For me it seems to delete the user picture when the user logs back in also, including all image styles.

teh_catt’s picture

There is a working patch here http://drupal.org/files/issues/935592_user_profile_picture_4.patch that you apply to drupal/modules/user/user.module and hey presto! no more vanishing pictures.

If like me you find applying patches mind bogglingly confusing use this tutorial http://drupal.org/node/32875 and when you run the patch skip the first bit (the test) and then type in user.module as for the second part of the patch. This should do the trick.

gurojoh’s picture

Yes, that works!Thank you very much!

gc11’s picture

yep fixed for me too, thanks.

sw3b’s picture

Is this patch plan to be ported to the core ?

alpritt’s picture

Yes, there is an issue for core to sort this out at #935592: User picture is deleted after calls to user_save(). I think it would be possible to sort this out for profile2 by making sure the picture was loaded in $edit when user_save() is called, but hopefully the fix will get added to core soon enough. But I'll leave this active in case the maintainers do want to do a temporary hacky fix here first.

fago’s picture

Status: Active » Closed (works as designed)