protected function getRoles($userId)
    {
        $roles = [];
        $result = $this->userRoles->query(new RqlQuery(new EqNode($this->config['userIdInUserRoles'], $userId)));

        foreach ($result as $item) {
            $role = $this->roles->read($item[$this->config['roleIdInUserRoles']]);

            if (isset($role[$this->config['roleName']])) {
                $roles[] = $role[$this->config['roleName']];
            }
        }

        return $roles;
    }