Community Forums
Combination View Flat View Tree View
Threads [ Previous | Next ]
Removing Default @domain.com From Login
toggle
I thought that I saw this before in the boards, but I haven't been able to turn it up. What do I need to modify to remove the @domain.com default from the login page's user ID field? Is this a simple JSP change or do I need to dig deeper into the code?

Thanks,
Josh
RE: Removing Default @domain.com From Login
Tags: authentication, login
7/29/08 11:53 AM as a reply to Josh Asbury.
Use the Enterprise Admin Portlet and then click on the following: >>, Settings, Authentication
On this page you can change the 'How do users authenticate?' property from email to 'screen name' or 'user id'
RE: Removing Default @domain.com From Login
7/29/08 12:00 PM as a reply to John Martin.
Thanks for your response, John. I understand that, but I want users to authenticate by their email address -- I just don't want my domain to automatically fill in for the user ID field. For example, my domain is @hinutech.com but my users could have any number of domains (gmail.com, yahoo.com, liferay.com) for their email addresses. I want to remove the confusion associated with having this auto-fill with something that is probably not relevant for them.

If this was an intranet site, I think that defaulting to the corporate domain would make alot of sense, but since this is a public site, it causes confusion for users.
RE: Removing Default @domain.com From Login
Tags: login
7/29/08 2:38 PM as a reply to Josh Asbury.
Hi Josh,

There is no way to change this with a simple set of a property. What do you think to open a improvement issue on support.liferay.com?

If you have urgency you can change the following line

1String login = LoginAction.getLogin(request, "login", company);


of the html/portlet/login/view.jsp file to

1String login = LoginAction.getLogin(request, "login", company);
2if (Validator.isNotNull(login) && login.startsWith(StringPool.AT)) {
3    login= StringPool.BLANK;
4}


I think this will solved your needs

Regards
RE: Removing Default @domain.com From Login
7/29/08 3:19 PM as a reply to Thiago Moreira.
Thanks, Thiago. I have created LEP-6926 for this improvement.
RE: Removing Default @domain.com From Login
8/5/08 6:09 AM as a reply to Josh Asbury.
Thanks to Brett Swaim, we now have a property to turn this on and off! See the LEP.
RE: Removing Default @domain.com From Login
8/5/08 2:07 PM as a reply to Josh Asbury.
Which property was added??
RE: Removing Default @domain.com From Login
8/8/08 11:01 AM as a reply to Jaime Israel Ramírez Hernández.
Jaime Israel Ramírez Hernández:
Which property was added??


See the following property in portal.properties:

#
# The login field is prepopulated with the company's domain name if the
# login is unpopulated and user authentication is based on email addresses.
# Set this to false to disable the behavior.
#
company.login.prepopulate.domain=false
RE: Removing Default @domain.com From Login
8/8/08 12:08 PM as a reply to Josh Asbury.
Thanks for your answer Josh emoticon

But... it's not working emoticon

My portal keeps showing the default domain name in the user text field.

Perhaps there's a problem with the portal reading some properties, like in this post says, the property xss.allow=false is not working.

I'm running the version 5.1 bundled with Tomcat 6 (the version from the downloads page).

Thanks!!!
RE: Removing Default @domain.com From Login
8/8/08 12:15 PM as a reply to Jaime Israel Ramírez Hernández.
Jaime Israel Ramírez Hernández:
Thanks for your answer Josh emoticon

I'm running the version 5.1 bundled with Tomcat 6 (the version from the downloads page).

Thanks!!!


Jaime -

Since this hasn't been packaged as part of an official bundled release yet, you will need to download/build from source for this new property to take effect.
RE: Removing Default @domain.com From Login
8/8/08 12:52 PM as a reply to Josh Asbury.
Thanks Josh:

Does that also apply to the xss.allow property?? (I changed my name to
<script>alert("XSS!!!");</script>
and now the portal keeps alerting all the time XD)