Should fix issue #3027: twitter user avatars not getting imported.
Due to the change in URI, all twitter users that had been previously seen were getting new profile entries, which tried to save the same avatar. This would fail as Avatar.url has a unique index.
Note: now anything new seen in the last couple days in production will still potentially conflict.
$fuser = new Foreign_user();
$fuser->nickname = $screen_name;
- $fuser->uri = 'http://twitter.com/#!/' . $screen_name;
+ $fuser->uri = 'http://twitter.com/' . $screen_name;
$fuser->id = $twitter_id;
$fuser->service = TWITTER_SERVICE;
$fuser->created = common_sql_now();
function ensureProfile($user)
{
// check to see if there's already a profile for this user
- $profileurl = 'http://twitter.com/#!/' . $user->screen_name;
+ $profileurl = 'http://twitter.com/' . $user->screen_name;
$profile = $this->getProfileByUrl($user->screen_name, $profileurl);
if (!empty($profile)) {