Problem/Motivation

The module needs a cleanup for adding or updating users. The module incorrectly tries to use the $infos variable where there is none.

Proposed resolution

Make sure the module does not trow unnecessary errors or notices when creating or updating users.

Remaining tasks

  • Remove function mailjet_user_cancel as this is not needed when using function mailjet_user_update.
  • Typehint the functions mailjet_user_insert, mailjet_user_update, mailjet_user_delete.
  • Update the function mailjet_sync_single_user to not trow errors.
  • Format the code to follow Drupal coding standards for the code that is changed.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Clean up the user sync and fix errors on adding or updating users

Comments

tim-diels created an issue. See original summary.

tim-diels’s picture

Status: Active » Needs review
StatusFileSize
new12.12 KB

Please review patch.

mailjet plugins’s picture

I can not apply the provided patch:

$ git apply 3072024-2.patch
3072024-2.patch:249: trailing whitespace.

3072024-2.patch:251: trailing whitespace.

error: patch failed: mailjet.module:419
error: mailjet.module: patch does not apply

Can you please advice ?

tim-diels’s picture

StatusFileSize
new6.03 KB
new5.98 KB

Sorry some more changes came trough than needed.
Adjusted patch so only changes that are needed comes trough.

tim-diels’s picture

StatusFileSize
new6 KB
new255 bytes

Removed debug code.

mailjet plugins’s picture

Assigned: Unassigned » mailjet plugins
mailjet plugins’s picture

Status: Needs review » Fixed

Hi, thanks for the provided patch! The issue has been fixed in version 8.x-2.4

Status: Fixed » Closed (fixed)

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