better deletion of old avatars
darcs-hash:20080518193951-84dde-cc45fbfba1f11a4ae2f629cc862e02a14743f2c1.gz
This commit is contained in:
parent
a4789e79c8
commit
6396504aa6
@ -205,8 +205,10 @@ class AvatarAction extends SettingsAction {
|
||||
$avatar->profile_id = $user->id;
|
||||
$avatar->find();
|
||||
while ($avatar->fetch()) {
|
||||
unlink(common_avatar_path($avatar->filename));
|
||||
$avatar->delete();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user