From 3e830dad374c9ccceaaa24fc7b8f87c1357fc3d7 Mon Sep 17 00:00:00 2001 From: Chimo Date: Tue, 15 Dec 2015 21:49:42 -0500 Subject: [PATCH] Make Profile::getUri work with Groups and by extension Profile::getAcctUri --- classes/Profile.php | 5 +++++ 1 file changed, 5 insertions(+) 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)); -- 2.39.2