Actually return an Ostatus_profile

This commit is contained in:
Mikael Nordfeldth 2016-03-27 14:54:14 +02:00
parent 4790db348d
commit 7be4641040

View File

@ -80,12 +80,13 @@ class Ostatus_profile extends Managed_DataObject
return $this->uri; 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) { 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;
} }
/** /**