Skip to content

Conversation

@RomainLvr
Copy link
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !40971
  • Here is a brief description of what this PR does

Apply #538 for the plugin version compatible with GLPI 11

@RomainLvr RomainLvr requested a review from Lainow December 15, 2025 13:46
@RomainLvr RomainLvr self-assigned this Dec 15, 2025
Copilot AI review requested due to automatic review settings December 15, 2025 13:46
Copy link

Copilot AI left a comment

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 applies fixes from a related pull request to make the DataInjection plugin compatible with GLPI 11. The changes focus on improving user field handling, email imports, and preventing data corruption during user updates.

Key changes:

  • Refactored the isNullable() method to properly identify non-nullable fields and prevent empty string insertion
  • Enhanced email import functionality to support multiple email addresses with validation
  • Added token field filtering to prevent double encryption issues

Reviewed changes

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

File Description
inc/userinjection.class.php Refactored nullable field logic, added email multi-value support with validation, and implemented token field filtering
inc/commoninjectionlib.class.php Improved empty value handling to correctly treat 0 as a valid value, and skip empty values for non-nullable fields during updates
inc/clientinjection.class.php Fixed URL parameter encoding by removing HTML entity encoding (Twig handles this automatically)

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

@RomainLvr RomainLvr merged commit 35a058c into main Dec 15, 2025
3 checks passed
@RomainLvr RomainLvr deleted the fix/user-update-and-email-import-v11 branch December 15, 2025 14:18
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