]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/accountprofileblock.php
Comment improvements with spl_autoload_register
[quix0rs-gnu-social.git] / lib / accountprofileblock.php
index 4eca000c9efed19ae3857a99962d5cd48e8b7e26..36f1fee27143b8bb7c7b817ab74ece0e7bb59ae0 100644 (file)
@@ -55,18 +55,12 @@ class AccountProfileBlock extends ProfileBlock
     {
         parent::__construct($out);
         $this->profile = $profile;
-        $this->user    = User::staticGet('id', $profile->id);
+        $this->user    = User::getKV('id', $profile->id);
     }
 
     function avatar()
     {
-        $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
-        if (empty($avatar)) {
-            $avatar = $this->profile->getAvatar(73);
-        }
-        return (!empty($avatar)) ?
-            $avatar->displayUrl() :
-            Avatar::defaultImage(AVATAR_PROFILE_SIZE);
+        return $this->profile->avatarUrl(AVATAR_PROFILE_SIZE);
     }
 
     function name()
@@ -94,6 +88,15 @@ class AccountProfileBlock extends ProfileBlock
         return $this->profile->bio;
     }
 
+    function otherProfiles()
+    {
+        $others = array();
+
+        Event::handle('OtherAccountProfiles', array($this->profile, &$others));
+        
+        return $others;
+    }
+
     function showTags()
     {
         $cur = common_current_user();