Narrow form_alter scope

Created on 28 February 2022, over 2 years ago
Updated 5 April 2023, over 1 year ago

Problem/Motivation

Currently the form_alter hook runs for all forms, and any form with the account key would have it's fields altered. We can tighten this up easily to avoid any unintended changes to other forms.

Proposed resolution

Check that the form object is an instance of Drupal\user\AccountForm, both the profile and register form extend this class.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia acbramley

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.

Production build 0.71.5 2024