Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-66896

Liferay7 override portal properties by hook

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: 7.0.0 CE GA1, 7.0.1 CE GA2
    • Fix Version/s: None
    • Labels:
      None
    • Fix Priority:
      3

      Description

      I would like to change users.full.name.generator
      Default is
      users.full.name.generator=com.liferay.portal.kernel.security.auth.DefaultFullNameGenerator
      Expected is
      users.full.name.generator=com.liferay.portal.kernel.security.auth.FamilyNameFirstFullNameGenerator

      I have created hook project, please find it in attached file, but it doesn't work. After deploy users.full.name.generator is default generator, but I would like FamilyNameFirstFullNameGenerator.

      I found the following information in portal.properties file

      Input a class name that implements
      com.liferay.portal.security.auth.FullNameGenerator. This class will be
      called to generate a full name from the user's first, middle, and last
      names.

      This property is not read by the portal except for portal properties
      overridden by liferay-hook.xml. It remains here only as a reference.

      users.full.name.generator=com.liferay.portal.security.auth.DefaultFullNameGenerator
      users.full.name.generator=com.liferay.portal.security.auth.FamilyNameFirstFullNameGenerator

      Could please investigate and give me reason, why my solution doesn't work and what is correct way to change this property?

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                3 years, 11 weeks, 2 days ago

                Packages

                Version Package