Issue Bug Closed

#107592SetupModuleController crashes when realName field is disabled in User Settings

Mikel Wohlschlegel 10/02/25, 09:14 updated 12/02/25, 13:04

Description

When the realName field is disabled or not submitted in the User Settings form (e.g., via TSconfig setup.realName.disabled = 1), the SetupModuleController throws a TypeError during save:

TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData::__construct():
Argument #6 ($newUserFullName) must be of type string, null given,
called in /var/www/html/vendor/typo3/cms-setup/Classes/Controller/SetupModuleController.php on line 239

Steps to Reproduce

  1. Add to User TSconfig: —> setup.realName.disabled = 1
  2. Go to User Settings in the backend
  3. Try to save any setting
  4. → TypeError is thrown

Root Cause

In SetupModuleController.php (line ~239), the code assumes $be_user_data[‘realName’] is always present:

$contextData = new ContextData(
    loginMode: 'BE',
    currentPasswordHash: $this->getBackendUser()->user['password'],
    newUserFullName: $be_user_data['realName']  // ❌ Can be null if field is disabled
);

If the field is not submitted (e.g., disabled via TSconfig or removed from the form), $be_user_data[‘realName’] is null, causing a type error in PHP 8+.

Environment

  • TYPO3 Version: 12.4.37
  • PHP Version: 8.2
  • Affected Component: typo3/cms-setup (SetupModuleController)

Reviews 3

History 37

  1. Anonymous commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-10-03T07:45:11+00:00" > 10/03/25, 07:45 </span>

    Applied in changeset commit:7b0d57e8be50685229fa83f98e583a86bedaa9e7.