Skip to content

Don’t log warnings in SSO user attribute mapping for native user properties#19294

Merged
brandonkelly merged 3 commits into
5.xfrom
bugfix/sso-attribute-mapping-logs
Jul 23, 2026
Merged

Don’t log warnings in SSO user attribute mapping for native user properties#19294
brandonkelly merged 3 commits into
5.xfrom
bugfix/sso-attribute-mapping-logs

Conversation

@angrybrad

Copy link
Copy Markdown
Member

Currently, every time an SSO user logs in, the logs fill up with warnings for common mappings like email, firstName, and lastName.

This PR changes it so it logs only warnings for missing custom fields that are being mapped but don’t exist in Craft.

Copilot AI review requested due to automatic review settings July 22, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces log noise during SSO logins by avoiding warning logs when an attribute mapping targets native User properties (e.g. email, firstName, lastName) rather than missing custom fields.

Changes:

  • Updated SSO user attribute mapping field-resolution logic to only warn when a mapped custom field can’t be found.
  • Added a release note describing the reduced warning logging for native user properties.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/auth/sso/mapper/SetUserValueTrait.php Adjusts when “field not found” warnings are emitted during SSO user attribute mapping.
CHANGELOG.md Notes the logging behavior change under an Unreleased section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/auth/sso/mapper/SetUserValueTrait.php Outdated
@brandonkelly
brandonkelly merged commit 4e087cf into 5.x Jul 23, 2026
13 checks passed
@brandonkelly
brandonkelly deleted the bugfix/sso-attribute-mapping-logs branch July 23, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants