Skip to content

[6.x]: Email cannot be set on users #18878

@AugustMiller

Description

@AugustMiller

What happened?

Description

The elements/apply-draft action is culling the email param when trying to update a user.

Steps to reproduce

  1. Visit Users+ New user;
  2. Fill email (and username if useEmailAsUsername is off);
  3. Press Save;

Expected behavior

Email is applied from the draft (or incoming params).

Actual behavior

Email is not stored on the draft (null in Ajax responses), and is stripped from POST data due to CraftCms\Cms\User\Elements\User::SENSITIVE_ATTRIBUTES.

Craft CMS version

6.0.0-alpha.2

PHP version

8.5.5

Operating system and version

DDEV

Database type and version

MySQL 8.0.40 (!?)

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions