Password

New in version 12.0: The TCA type password has been introduced. It replaces the eval=password and eval=saltedPassword option of TCA type input.

The TCA type password should be used to input values representing passwords.

Example

A simple password field:

'password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'password',
    ]
]

Migration

The migration from eval='password' and eval='saltedPassword' to type=password is done like following:

// Before

'password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'input',
        'eval' => 'trim,password,saltedPassword',
    ]
]

// After

'password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'password',
    ]
]

// Before

'another_password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'input',
        'eval' => 'trim,password',
    ]
]

// After

'another_password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'password',
        'hashed' => false,
    ]
]

An automatic TCA migration is performed on the fly, migrating all occurrences to the new TCA type and triggering a PHP E_USER_DEPRECATED error where code adoption has to take place.

Note

The value of TCA type password column is automatically trimmed before being stored (and optionally hashed) in the database. Therefore, the eval=trim option is no longer needed and should be removed from the TCA configuration.