]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Actually return an Ostatus_profile
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 27 Mar 2016 12:54:14 +0000 (14:54 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 27 Mar 2016 12:54:14 +0000 (14:54 +0200)
plugins/OStatus/classes/Ostatus_profile.php

index 2b1ab8ddd90222d2d9f821ccd54b17c237ea9a04..5673d51457970adc99bb110e56743e59ae5a1e93 100644 (file)
@@ -80,12 +80,13 @@ class Ostatus_profile extends Managed_DataObject
         return $this->uri;
     }
 
-    public function fromProfile(Profile $profile)
+    static function fromProfile(Profile $profile)
     {
-        $oprofile = Ostatus_profile::getKV('profile_id', $profile->id);
+        $oprofile = Ostatus_profile::getKV('profile_id', $profile->getID());
         if (!$oprofile instanceof Ostatus_profile) {
-            throw new Exception('No Ostatus_profile for Profile ID: '.$profile->id);
+            throw new Exception('No Ostatus_profile for Profile ID: '.$profile->getID());
         }
+        return $oprofile;
     }
 
     /**