]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use functions instead of accessing properties in twitterUserArray
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 8 Feb 2016 11:21:58 +0000 (12:21 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 8 Feb 2016 11:21:58 +0000 (12:21 +0100)
lib/apiaction.php

index 16c375ee120f958307e378844f26a3a04bd6e680..6f2f43ab9cffa4294ae03191ac0637822587929a 100644 (file)
@@ -214,11 +214,11 @@ class ApiAction extends Action
             $user = null;
         }
 
-        $twitter_user['id'] = intval($profile->id);
+        $twitter_user['id'] = $profile->getID();
         $twitter_user['name'] = $profile->getBestName();
-        $twitter_user['screen_name'] = $profile->nickname;
-        $twitter_user['location'] = ($profile->location) ? $profile->location : null;
-        $twitter_user['description'] = ($profile->bio) ? $profile->bio : null;
+        $twitter_user['screen_name'] = $profile->getNickname();
+        $twitter_user['location'] = $profile->location;
+        $twitter_user['description'] = $profile->getDescription();
 
         // TODO: avatar url template (example.com/user/avatar?size={x}x{y})
         $twitter_user['profile_image_url'] = Avatar::urlByProfile($profile, AVATAR_STREAM_SIZE);