Implement a User_group fetching function for Local_group
This commit is contained in:
parent
05b603b1da
commit
a6f99e7296
@ -40,13 +40,18 @@ class Local_group extends Managed_DataObject
|
|||||||
|
|
||||||
public function getProfile()
|
public function getProfile()
|
||||||
{
|
{
|
||||||
$group = User_group::getKV('id', $this->group_id);
|
$group = $this->getGroup();
|
||||||
if (!($group instanceof User_group)) {
|
if (!$group instanceof User_group) {
|
||||||
return null; // TODO: Throw exception when other code is ready
|
return null; // TODO: Throw exception when other code is ready
|
||||||
}
|
}
|
||||||
return $group->getProfile();
|
return $group->getProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getGroup()
|
||||||
|
{
|
||||||
|
return User_group::getKV('id', $this->group_id);
|
||||||
|
}
|
||||||
|
|
||||||
function setNickname($nickname)
|
function setNickname($nickname)
|
||||||
{
|
{
|
||||||
$this->decache();
|
$this->decache();
|
||||||
|
Loading…
Reference in New Issue
Block a user