<?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>How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114461176" />
  <subtitle>How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114461176</id>
  <updated>2026-04-04T00:04:45Z</updated>
  <dc:date>2026-04-04T00:04:45Z</dc:date>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118836831" />
    <author>
      <name>Jonathan Mccann</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118836831</id>
    <updated>2020-03-31T18:30:33Z</updated>
    <published>2020-03-31T18:30:33Z</published>
    <summary type="html">While this will circumvent the &amp;#34;com.liferay.portal.kernel.security.auth.LiberalEmailAddressValidator cannot be found&amp;#34; error the desired service will still not be utilized.&lt;br /&gt;The issue will be fixed here - &lt;a href="https://issues.liferay.com/browse/LPS-111288"&gt;https://issues.liferay.com/browse/LPS-111288&lt;/a&gt;</summary>
    <dc:creator>Jonathan Mccann</dc:creator>
    <dc:date>2020-03-31T18:30:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118168740" />
    <author>
      <name>Menno Avegaart</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118168740</id>
    <updated>2019-12-30T09:28:23Z</updated>
    <published>2019-12-30T09:28:23Z</published>
    <summary type="html">Just ran into the same problem, but the solution is simple:&lt;br /&gt;&lt;br /&gt;1. Create a war hook and specify your own properties file in the portal-properties element of liferay-hook.xml.&lt;br /&gt;&lt;br /&gt;2. In the properties file specify: users.screen.name.validator=com.liferay.portal.kernel.security.auth.LiberalScreenNameValidator&lt;br /&gt;&lt;br /&gt;3. Add the com.liferay.portal.kernel.security.auth package to the DynamicImport-Package section of your liferay-plugin-package.properties file.</summary>
    <dc:creator>Menno Avegaart</dc:creator>
    <dc:date>2019-12-30T09:28:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114580397" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114580397</id>
    <updated>2019-08-02T14:05:38Z</updated>
    <published>2019-08-02T14:05:38Z</published>
    <summary type="html">Hey Lars,&lt;br /&gt;&lt;br /&gt;It might be worth it to open a ticket at issues.liferay.com to let Liferay know. If you do open that ticket, can you update this thread with the link to the issue so that anyone else who comes along with the same question has a breadcrumb to follow (maybe even to an answer)?</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-08-02T14:05:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114578469" />
    <author>
      <name>Lars Møller Sørensen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114578469</id>
    <updated>2019-08-02T10:42:38Z</updated>
    <published>2019-08-02T10:42:38Z</published>
    <summary type="html">Hi Andrew,&lt;br /&gt;&lt;br /&gt;I haven&amp;#39;t tried the environment variable, as that just looks like another way of setting a portal property that isn&amp;#39;t read anyway. I guess I might be wrong on that, but I really don&amp;#39;t think so.&lt;br /&gt;&lt;br /&gt;Yeah, I implemented a solution very similar to your suggestion.&lt;br /&gt;&lt;br /&gt;But like you I&amp;#39;m still wondering if this is an oversight or if we&amp;#39;re just missing a configuration somewhere...</summary>
    <dc:creator>Lars Møller Sørensen</dc:creator>
    <dc:date>2019-08-02T10:42:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114487089" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114487089</id>
    <updated>2019-07-29T16:14:39Z</updated>
    <published>2019-07-29T16:14:39Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I can't seem to find a configuration for it either, even looking through the source, so now I am wondering if perhaps this is an oversight?&lt;br&gt;At the very least you should be able to do this --&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;@Component(
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;immediate = true, property = {"service.ranking:Integer=100"},
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;service = ScreenNameValidator.class
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;)
public class CustomScreenNameValidator extends LiberalScreenNameValidator {
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;@Override&amp;amp;nbsp;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;public boolean validate(long companyId, String screenName) {&amp;amp;nbsp;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return super.validate(companyId, screenName)
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}
}

&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;So that you don't have to write any logic, just wrap what liferay provides to bump the priority using the service ranking. Again though, this must either be a well hidden configuration or an oversight because this is not the norm at all.&amp;nbsp;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-07-29T16:14:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114486420" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114486420</id>
    <updated>2019-07-29T16:04:28Z</updated>
    <published>2019-07-29T16:04:28Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi&amp;nbsp;Lars,&amp;nbsp;The comment also specifies that you can use an environment variable to set the value&lt;pre&gt;&lt;code&gt;# Env: LIFERAY_USERS_PERIOD_SCREEN_PERIOD_NAME_PERIOD_VALIDATOR # #users.screen.name.validator=com.liferay.portal.security.auth.DefaultScreenNameValidator #users.screen.name.validator=com.liferay.portal.security.auth.LiberalScreenNameValidator
&lt;/code&gt;&lt;/pre&gt;Have you tried that? I don't think you should have to create your own copy of that validator class as has been suggested just to have the same behaviour.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-07-29T16:04:28Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114476895" />
    <author>
      <name>Lars Møller Sørensen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114476895</id>
    <updated>2019-07-29T08:49:41Z</updated>
    <published>2019-07-29T08:49:41Z</published>
    <summary type="html">Thanks Mohammed, I guess I&amp;#39;ll do that. &lt;br /&gt;It just seems kind of silly when Liferay already includes LiberalScreenNameValidator.</summary>
    <dc:creator>Lars Møller Sørensen</dc:creator>
    <dc:date>2019-07-29T08:49:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114462651" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114462651</id>
    <updated>2019-07-26T19:37:39Z</updated>
    <published>2019-07-26T19:37:39Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;You&amp;nbsp; can write &amp;nbsp;your own ScreenName Validator service&amp;nbsp; ,&lt;br&gt;&lt;pre&gt;&lt;code&gt;@Component(
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;immediate = true, property = {"service.ranking:Integer=100"},
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;service = ScreenNameValidator.class
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;)
public class CustomScreenNameValidator implements ScreenNameValidator{
&amp;amp;nbsp; &amp;amp;nbsp; @Override
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;public String getAUIValidatorJS() {
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;return null;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}&amp;amp;nbsp;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;@Override
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;public String getDescription(Locale locale) {
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; return "CustomScreenNameValidator";
&amp;amp;nbsp; &amp;amp;nbsp; }
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;@Override
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;public boolean validate(long companyId, String screenName) {
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; //You Custom Validation
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; return true;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}&amp;amp;nbsp;
}&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-07-26T19:37:39Z</dc:date>
  </entry>
  <entry>
    <title>How do you configure Liferay 7.2 to use LiberalScreenNameValidator?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114461175" />
    <author>
      <name>Lars Møller Sørensen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114461175</id>
    <updated>2019-07-26T15:26:38Z</updated>
    <published>2019-07-26T15:26:38Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m in the progress of updating our (fairly big) code base from 6.1.1 to 7.2.0. I&amp;#39;m making good progress, but having a bit of trouble with this issue, even though it seems like it should be very simple.&lt;br /&gt;&lt;br /&gt;On Liferay 6.1.1 we had this in our portal-ext.properties:&lt;br /&gt;users.screen.name.validator=com.liferay.portal.security.auth.LiberalScreenNameValidator&lt;br /&gt;&lt;br /&gt;Now I&amp;#39;m reading in the 7.2 portal.properties that:&lt;br /&gt;    # This property is not read by the portal except for portal properties&lt;br /&gt;    # overridden by liferay-hook.xml. It remains here only as a reference.&lt;br /&gt;&lt;br /&gt;So then how to you configure the portal to use it?&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tried creating a hook with &amp;#34;blade create -t war-hook&amp;#34; and setting it in the portal.properties there, but getting the following exception on deploy:&lt;br /&gt;...&lt;br /&gt;Caused by: java.lang.ClassNotFoundException: com.liferay.portal.kernel.security.auth.LiberalEmailAddressValidator cannot be found by sch-hook_7.2.0.1&lt;br /&gt;    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)&lt;br /&gt;    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)&lt;br /&gt;    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)&lt;br /&gt;    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)&lt;br /&gt;    at java.lang.ClassLoader.loadClass(Unknown Source)&lt;br /&gt;    at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:56)&lt;br /&gt;    at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:27)&lt;br /&gt;    at com.liferay.portal.kernel.util.ProxyFactory.newInstance(ProxyFactory.java:55)&lt;br /&gt;    at com.liferay.portal.kernel.util.ProxyFactory.newInstance(ProxyFactory.java:46)&lt;br /&gt;    at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.newInstance(BaseHotDeployListener.java:78)&lt;br /&gt;    at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1660)&lt;br /&gt;&lt;br /&gt;Maybe I can avoid that by coping the class into my hook, but is that really the right way?&lt;br /&gt;&lt;br /&gt;Other stuff I&amp;#39;ve tried:&lt;br /&gt;- Looking in the control panel to see if it now can be configured there. Can&amp;#39;t find anything. &lt;br /&gt;- Poked around in the gogo shell to see if anything can be done there. Not getting anywhere. &lt;br /&gt;- Looked through the 6.2 / 7.0 / 7.1 / 7.2 &amp;#34;Breaking Changes&amp;#34; pages. Can&amp;#39;t find find anything relevant.</summary>
    <dc:creator>Lars Møller Sørensen</dc:creator>
    <dc:date>2019-07-26T15:26:38Z</dc:date>
  </entry>
</feed>
