/** * * @return Usergroup[] */ private function GetGroups() { if ($this->groups === null) { $this->groups = array(); if (!$this->GetUser()) { return $this->groups; } $userGroups = UserUsergroup::Schema()->FetchByUser(true, $this->GetUser()); foreach ($userGroups as $userGroup) { $this->groups[] = $userGroup->GetUserGroup(); } } return $this->groups; }
protected function DeleteGroupAssignment(Usergroup $group) { UserUsergroup::Schema()->Delete($this->UserGroupWhere($group)); }