Skip to content

MODX 3 modUser class joinGroup() crashes is $_SESSION is not set #15374

@BobRay

Description

@BobRay

Bug report

Summary

Quick summary what's this issue about.

Calling $user->joinGroup() with no $_SESSION set crashes.

Here's the offending code (line 716 of core/model/modx/moduser.class.php):

                     unset($_SESSION["modx.user.{$this->get('id')}.userGroupNames"],
                     $_SESSION["modx.user.{$this->get('id')}.userGroups"]);

This breaks acceptance tests that run in the MODX Manager.

Environment

MODX version, MODX 2.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions