Hi,

I experienced a strange behavior. Per default, a user starts with the default picture.. (the path goes to my theme-directory)
when a user now uploads his custom picture, the default picture gets deleted. while this behavior should be normal
to old custom profile pictures, the default picture should certainly _not_ be deleted.. what do I do wrong?

Comments

dsms’s picture

to make this more clear: I mean not the relation between user profile and image.. I mean the default image file gets deleted physically.

dsms’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

I'm sorry, completely my own fault!

In hook_user I added the user_picture_default path to $account->picture to have it always in $user-object so I could use it in combination with theme_imagecache() in my modules and templates. Unfortunally, Drupal deletes $user->picture if a new one is uploaded. Well, I solved this simply by using a free attribute in $user object.