Legacy Knowledge Base
Published Jun. 30, 2025

Avoid last name field being mandatory when creating users

Written By

Ricardo Couso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • When creating new users, some fields (such as first name and last name) are mandatory, marked with a red asterisk.
  • How can one specify the mandatory fields?

Environment

  • Quarterly Release 2024.Q1, 2024.Q2, 2024.Q3

Resolution

  • A while back there was the portal property users.last.name.required, with value true or false, used to specify last name as a mandatory field or not, respectively.
  • In this breaking change the property was removed in favor of the language property lang.user.name.required.field.names, whose default value is last-name.
  • Since the appearance of the Language Override tool it's possible to easily change the values of keys for different languages. To make last name non-mandatory, edit the value fo the key lang.user.name.required.field.names to be just first-name.
    • Note: For most of the language keys, changes in the translations take effect immediately, but the key lang.user.name.required.field.names is loaded once at the start, so for the changes to be visible the portal needs to be restarted. 

Additional Information

  • The fields present in the user creation form are controlled by the property lang.user.name.field.names, which can also be modified using Language Override.

 

 

Did this article resolve your issue ?

Legacy Knowledge Base