if ($filedata) { $userpic = new vB_Datamanager_Userpic_Avatar($vbulletin, vB_DataManager_Constants::ERRTYPE_CP, 'userpic'); $userpic->set_existing($image); $userpic->setr('filedata', $filedata); $userpic->save(); unset($userpic); } } if (!empty($image['pfilename'])) { $path = $vbulletin->options['profilepicpath'] . "/profilepic{$image['userid']}_{$image['profilepicrevision']}.gif"; $filedata = @file_get_contents($path); if ($filedata) { $userpic = new vB_Datamanager_Userpic_Profilepic($vbulletin, vB_DataManager_Constants::ERRTYPE_CP, 'userpic'); $userpic->set_existing($image); $userpic->setr('filedata', $filedata); $userpic->save(); unset($userpic); } } if (!empty($image['sfilename'])) { $path = $vbulletin->options['sigpicpath'] . "/sigpic{$image['userid']}_{$image['sigpicrevision']}.gif"; $filedata = @file_get_contents($path); if ($filedata) { $userpic = new vB_Datamanager_Userpic_Sigpic($vbulletin, vB_DataManager_Constants::ERRTYPE_CP, 'userpic'); $userpic->set_existing($image); $userpic->setr('filedata', $filedata); $userpic->save(); unset($userpic); } } $vbulletin->options['usefileavatar'] = true;