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();
    }