]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make Profile::getUri work with Groups
authorChimo <chimo@chromic.org>
Wed, 16 Dec 2015 02:49:42 +0000 (21:49 -0500)
committerChimo <chimo@chromic.org>
Wed, 16 Dec 2015 02:50:10 +0000 (21:50 -0500)
and by extension Profile::getAcctUri

classes/Profile.php

index 78ef18484c7e0d9f7c9f2559cb419783f39fd1ad..547ed485e8c9e8e94fa62e5282fcf279c269c694 100644 (file)
@@ -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));