diff --git a/classes/Local_group.php b/classes/Local_group.php index 95182a7c8f..c0dcf02e4b 100644 --- a/classes/Local_group.php +++ b/classes/Local_group.php @@ -40,13 +40,18 @@ class Local_group extends Managed_DataObject public function getProfile() { - $group = User_group::getKV('id', $this->group_id); - if (!($group instanceof User_group)) { + $group = $this->getGroup(); + if (!$group instanceof User_group) { return null; // TODO: Throw exception when other code is ready } return $group->getProfile(); } + public function getGroup() + { + return User_group::getKV('id', $this->group_id); + } + function setNickname($nickname) { $this->decache();