code/libraries/joomlatools/component/koowa/user/user.php
public function getGroups()
    {
        $data  = $this->getData();
        $groups = KObjectConfig::unbox($data->groups);

        if(empty($groups)) {
            $this->getSession()->set('user.groups', JAccess::getGroupsByUser($this->getId()));
        }

        return parent::getGroups();
    }
public function getGroups()
    {
        $data  = $this->getData();
        $groups = KObjectConfig::unbox($data->groups);

        if(empty($groups)) {
            $this->getSession()->set('user.groups', JAccess::getGroupsByUser($this->getId()));
        }

        return parent::getGroups();
    }
public function getGroups ( ) { $ data = $ this -> getData ( ) ; $ groups = KObjectConfig :: unbox ( $ data -> groups ) ; if ( empty ( $ groups ) ) { $ this -> getSession ( ) -> set ( 'user.groups' , JAccess :: getGroupsByUser ( $ this -> getId ( ) ) ) ; } return parent :: getGroups ( ) ; }
Returns the groups the user is part of

@return array An array of group id's
Returns the groups the user is part of