]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
Moved functions into ActivityHandlerPlugin from MicroAppPlugin
[quix0rs-gnu-social.git] / classes / User.php
index c23b0a0b0ae98f800e76fc5f2da25a9840ca0800..c3ceb2646b166ca57a912c1d44aec2c31073a35a 100644 (file)
@@ -123,19 +123,15 @@ class User extends Managed_DataObject
     public function getProfile()
     {
         if (!isset($this->_profile[$this->id])) {
-            $this->_setProfile(Profile::getKV('id', $this->id));
+            $profile = Profile::getKV('id', $this->id);
+            if (!$profile instanceof Profile) {
+                throw new UserNoProfileException($this);
+            }
+            $this->_profile[$this->id] = $profile;
         }
         return $this->_profile[$this->id];
     }
 
-    public function _setProfile(Profile $profile=null)
-    {
-        if (!$profile instanceof Profile) {
-            throw new UserNoProfileException($this);
-        }
-        $this->_profile[$this->id] = $profile;
-    }
-
     public function getUri()
     {
         return $this->uri;
@@ -444,11 +440,6 @@ class User extends Managed_DataObject
         }
     }
 
-    function hasFave($notice)
-    {
-        return $this->getProfile()->hasFave($notice);
-    }
-
     function mutuallySubscribed(Profile $other)
     {
         return $this->getProfile()->mutuallySubscribed($other);
@@ -483,16 +474,6 @@ class User extends Managed_DataObject
         return $this->getProfile()->getNotices($offset, $limit, $since_id, $before_id);
     }
 
-    function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
-    {
-        return $this->getProfile()->favoriteNotices($own, $offset, $limit, $since_id, $max_id);
-    }
-
-    function blowFavesCache()
-    {
-        $this->getProfile()->blowFavesCache();
-    }
-
     function getSelfTags()
     {
         return Profile_tag::getTagsArray($this->id, $this->id, $this->id);
@@ -645,7 +626,7 @@ class User extends Managed_DataObject
             common_log(LOG_INFO, "User {$this->nickname} has no profile; continuing deletion.");
         }
 
-        $related = array('Fave',
+        $related = array(
                          'Confirm_address',
                          'Remember_me',
                          'Foreign_link',