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

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

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

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

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

@return int The role id
Returns the roles of the user