Problem/Motivation

A user can be created anonymous or without an email address. However, postSave() hook tries to send an email after an user is created and it results in an error if the email handlers aren't checking for empty email addresses before hand.

Proposed resolution

User entity postSave() hook should check for the email address prior to making an email sending attempt.

Issue fork drupal-3312582

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

fathima.asmat created an issue. See original summary.

fathima.asmat’s picture

Status: Active » Needs review
cilefen’s picture

Component: mail system » user system
Status: Needs review » Needs work
Related issues: +#286401: Make email not required for a Drupal site account

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mehul.gada made their first commit to this issue’s fork.

mehul.gada’s picture

Status: Needs work » Needs review

Since MR should not be raised for the 9.4.x branch, I have rerolled the patch for 9.5.x and accordingly raised MR https://git.drupalcode.org/project/drupal/-/merge_requests/3706

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests

Needs a test case showing the issue.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dcam’s picture

Status: Needs work » Closed (duplicate)