Make Profile::getUri work with Groups

and by extension Profile::getAcctUri
This commit is contained in:
Chimo 2015-12-15 21:49:42 -05:00
parent d8092207c0
commit 3e830dad37

View 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));