<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Overriding DefaultFullNameGenerator</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121330293" />
  <subtitle>Overriding DefaultFullNameGenerator</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121330293</id>
  <updated>2026-04-06T08:59:52Z</updated>
  <dc:date>2026-04-06T08:59:52Z</dc:date>
  <entry>
    <title>RE: Overriding DefaultFullNameGenerator</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121356135" />
    <author>
      <name>Steve Weiss</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121356135</id>
    <updated>2022-02-08T17:53:45Z</updated>
    <published>2022-02-08T17:53:30Z</published>
    <summary type="html">&lt;p&gt;Turns out we can simply
  extend com.liferay.portal.kernel.security.auth.DefaultFullNameGenerator
  and override the getFullName method to do what we want.&lt;/p&gt;</summary>
    <dc:creator>Steve Weiss</dc:creator>
    <dc:date>2022-02-08T17:53:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Overriding DefaultFullNameGenerator</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121337785" />
    <author>
      <name>Steve Weiss</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121337785</id>
    <updated>2022-01-20T18:58:08Z</updated>
    <published>2022-01-20T18:58:08Z</published>
    <summary type="html">&lt;p&gt;Thanks. As far as I can tell there doesn't seem to be an OSGI service
  involved. The class we're extending is in portal-kernel.jar:&lt;/p&gt;
&lt;p&gt;    com/liferay/portal/kernel/security/auth/DefaultFullNameGenerator.class&lt;/p&gt;
&lt;p&gt;There's configuration in security-spring.xml, which is in
  portal-impl.jar in the ROOT webapp:&lt;/p&gt;
&lt;p&gt;&amp;lt;bean
  class=&amp;quot;com.liferay.portal.kernel.security.auth.DefaultFullNameGenerator&amp;quot;
  id=&amp;quot;com.liferay.portal.kernel.security.auth.DefaultFullNameGenerator&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;bean
  class=&amp;quot;com.liferay.portal.kernel.security.auth.FullNameGeneratorFactory&amp;quot;
  id=&amp;quot;com.liferay.portal.kernel.security.auth.FullNameGeneratorFactory&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;property name=&amp;quot;fullNameGenerator&amp;quot;
  ref=&amp;quot;com.liferay.portal.kernel.security.auth.DefaultFullNameGenerator&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Basically what we need this to do is, after the user has logged in it
  hits our LDAP server and gets the user's preferred name, and updates
  what has been stored in Liferay.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Steve Weiss</dc:creator>
    <dc:date>2022-01-20T18:58:08Z</dc:date>
  </entry>
  <entry>
    <title>RE: Overriding DefaultFullNameGenerator</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121331235" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121331235</id>
    <updated>2022-01-14T15:56:12Z</updated>
    <published>2022-01-14T15:56:11Z</published>
    <summary type="html">&lt;p&gt;Check if the interface that your generator implements is still there,
  and is implemented by an OSGi Service. That should point you to a
  possible path. Note that the interface might have changed packages -
  there has been quite a lot of &amp;quot;repackaging&amp;quot; between 6.2 and
  7.0, but it still should be recognizable.&lt;/p&gt;
&lt;p&gt;If you check how it's currently implemented (e.g. how Liferay's
  default implementations are wired) you're one step closer to the solution.&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2022-01-14T15:56:11Z</dc:date>
  </entry>
  <entry>
    <title>Overriding DefaultFullNameGenerator</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121330292" />
    <author>
      <name>Steve Weiss</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121330292</id>
    <updated>2022-01-13T15:36:52Z</updated>
    <published>2022-01-13T15:32:25Z</published>
    <summary type="html">&lt;p&gt;We are moving from Liferay 6.2 to 7.2, and in 6.2 we had a component
  that overrode the DefaultFullNameGenerator. It was configured in
  liferay-portal.ext thusly:&lt;/p&gt;
&lt;p&gt;users.full.name.generator=gov.nasa.hq.liferay.portal.NasaPreferredNameGenerator&lt;/p&gt;
&lt;p&gt;So now I have two questions (to start with):&lt;/p&gt;
&lt;p&gt;1. Will this configuratin still work in 7.2?&lt;/p&gt;
&lt;p&gt;2. In 6.2 the component was deployed as an ext plugin. I'd rather not
  do that in 7.2 so what would be the best approach. I think there's
  only one Java class so hopefully it will simple.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Steve Weiss</dc:creator>
    <dc:date>2022-01-13T15:32:25Z</dc:date>
  </entry>
</feed>
