]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Shorthand function for getActor
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 2 Oct 2015 22:43:34 +0000 (00:43 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 2 Oct 2015 22:43:34 +0000 (00:43 +0200)
plugins/Favorite/classes/Fave.php

index f40efcf8abb82a089e1581807dcd324e4019aa2e..1e011decf8d74bca5723d45031911eaf12e2044a 100644 (file)
@@ -423,12 +423,7 @@ class Fave extends Managed_DataObject
 
     public function getActor()
     {
-        $profile = new Profile();
-        $profile->id = $this->user_id;
-        if (!$profile->find(true)) {
-            throw new NoResultException($profile);
-        }
-        return $profile;
+        return Profile::getByID($this->user_id);
     }
 
     public function getActorObject()