Do proper fromUri lookup on groups too

This commit is contained in:
Mikael Nordfeldth
2016-01-09 14:36:47 +01:00
parent 55aa68b941
commit c3c5a9974d
3 changed files with 16 additions and 7 deletions

View File

@@ -1555,6 +1555,11 @@ class Profile extends Managed_DataObject
$user = User::getKV('uri', $uri);
if ($user instanceof User) {
$profile = $user->getProfile();
} else {
$group = User_group::getKV('uri', $uri);
if ($group instanceof User_group) {
$profile = $group->getProfile();
}
}
Event::handle('EndGetProfileFromURI', array($uri, $profile));
}