X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FProfile.php;h=db8326f0f6959dbd090e39dda6ef7bfe1f77e60e;hb=b53e1439969bfa2c0b551d8cc2fc8fe15652c62a;hp=3c3b3475b955988386b566bef7853ed33371ba9a;hpb=0590f2975e6c5b26bbe6121da5c49890e035721e;p=quix0rs-gnu-social.git diff --git a/classes/Profile.php b/classes/Profile.php index 3c3b3475b9..db8326f0f6 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -160,7 +160,7 @@ class Profile extends Managed_DataObject return $this->getGroup()->setOriginal($filename); } - $imagefile = new ImageFile($this->id, Avatar::path($filename)); + $imagefile = new ImageFile(null, Avatar::path($filename)); $avatar = new Avatar(); $avatar->profile_id = $this->id; @@ -1572,6 +1572,15 @@ class Profile extends Managed_DataObject return $this->getUser()->shortenLinks($text, $always); } + public function isPrivateStream() + { + // We only know of public remote users as of yet... + if (!$this->isLocal()) { + return false; + } + return $this->getUser()->private_stream ? true : false; + } + public function delPref($namespace, $topic) { return Profile_prefs::setData($this, $namespace, $topic, null); }