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

Created on 11 September 2024, 11 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

Active

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