From: Chimo <chimo@chromic.org>
Date: Wed, 16 Dec 2015 02:49:42 +0000 (-0500)
Subject: Make Profile::getUri work with Groups
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3e830dad374;p=quix0rs-gnu-social.git

Make Profile::getUri work with Groups

and by extension Profile::getAcctUri
---

diff --git a/classes/Profile.php b/classes/Profile.php
index 78ef18484c..547ed485e8 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -1439,6 +1439,11 @@ class Profile extends Managed_DataObject
             $user = User::getKV('id', $this->id);
             if ($user instanceof User) {
                 $uri = $user->getUri();
+            } else {
+                $group = User_group::getKV('profile_id', $this->id);
+                if ($group instanceof User_group) {
+                    $uri = $group->getUri();
+                }
             }
 
             Event::handle('EndGetProfileUri', array($this, &$uri));