diff --git a/plugins/TwitterBridge/lib/twitterimport.php b/plugins/TwitterBridge/lib/twitterimport.php
index e4621df90c..70c9093fa2 100644
--- a/plugins/TwitterBridge/lib/twitterimport.php
+++ b/plugins/TwitterBridge/lib/twitterimport.php
@@ -241,6 +241,16 @@ class TwitterImport
protected function ensureProfile($twuser)
{
// check to see if there's already a profile for this user
+ $profileurl = 'https://twitter.com/' . $twuser->screen_name;
+ try {
+ $profile = $this->getProfileByUrl($twuser->screen_name, $profileurl);
+ $this->updateAvatar($twuser, $profile);
+ return $profile;
+ } catch (NoResultException $e) {
+ common_debug(__METHOD__ . ' - Falling back to check for http: ' .
+ "for Twitter user: $profileurl.");
+ }
+
$profileurl = 'http://twitter.com/' . $twuser->screen_name;
try {
$profile = $this->getProfileByUrl($twuser->screen_name, $profileurl);
@@ -527,9 +537,9 @@ class TwitterImport
static function atLink($screenName, $fullName, $orig)
{
if (!empty($fullName)) {
- return "{$orig}";
+ return "{$orig}";
} else {
- return "{$orig}";
+ return "{$orig}";
}
}