Problem/Motivation

If a user is not saved in the database they can not be added to a group.
I confirmed the user is not saved when userSync is ran with a new user and that the
group module throws an exception since the user is not saved yet.

Steps to reproduce

Visit the /saml/login page with a new user account and confirm they are not initially added to their groups.

Proposed resolution

Move the logic to sync the users to a service. Then use a state variable to mark the user as needing to be processed.
Then we can check for the state variable on the user insert hook and call the service to sync the user there.
Making sure that the code to sync the user is called only after the user is in the database.

Remaining tasks

Creating MR.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sstapleton created an issue. See original summary.

sstapleton’s picture

Status: Active » Needs review

minoroffense’s picture

Version: 2.x-dev » 3.x-dev
Status: Needs review » Patch (to be ported)

minoroffense’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.