Move user_user_presave() to User entity class

Created on 11 February 2020, over 5 years ago
Updated 26 September 2025, 26 days ago

Problem/Motivation

In #3015811: Properly deprecate DRUPAL_USER_TIMEZONE_* constants β†’ we tried to move all the system module's user code to the user module but system_user_presave() proved problematic because of the interaction between filtering empty field items and when the presave hook is fired as opposed to when the entity's preSave() method is called.

Note that when this method is move to the entity class Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserTest fails.

Proposed resolution

Resolve difference between a NULL and '' and ensure that the timezone is set as expected.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

RTBC

Version

11.0 πŸ”₯

Component

user.module

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024