When calling "change_pwd_form" programmatically, the account is not set to current user

Created on 11 September 2024, 8 months ago
Updated 12 September 2024, 8 months ago

Problem/Motivation

When invoking the "change_pwd_form" form like so:

\Drupal::formBuilder()->getForm('Drupal\change_pwd_page\Form\ChangePasswordForm');

The buildForm method expects the user to be filled in.

Proposed resolution

Initialise the $user variable earlier on.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇪🇸Spain pcambra Asturies

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024