Forums

Home » Liferay Portal » English » 3. Development »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Joshua Asbury
Removing Default @domain.com From Login
July 29, 2008 11:23 AM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 495

Join Date: September 8, 2006

Recent Posts

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
John Martin
RE: Removing Default @domain.com From Login
July 29, 2008 11:53 AM
Answer

John Martin

Rank: Junior Member

Posts: 29

Join Date: June 23, 2008

Recent Posts

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'
Joshua Asbury
RE: Removing Default @domain.com From Login
July 29, 2008 12:00 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 495

Join Date: September 8, 2006

Recent Posts

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.
Thiago Leão Moreira
RE: Removing Default @domain.com From Login
July 29, 2008 2:38 PM
Answer

Thiago Leão Moreira

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1061

Join Date: October 10, 2007

Recent Posts

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

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


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

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


I think this will solved your needs

Regards
Joshua Asbury
RE: Removing Default @domain.com From Login
July 29, 2008 3:19 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 495

Join Date: September 8, 2006

Recent Posts

Thanks, Thiago. I have created LEP-6926 for this improvement.
Joshua Asbury
RE: Removing Default @domain.com From Login
August 5, 2008 6:09 AM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 495

Join Date: September 8, 2006

Recent Posts

Thanks to Brett Swaim, we now have a property to turn this on and off! See the LEP.
Jaime Israel Ramírez Hernández
RE: Removing Default @domain.com From Login
August 5, 2008 2:07 PM
Answer

Jaime Israel Ramírez Hernández

Rank: Regular Member

Posts: 115

Join Date: April 14, 2008

Recent Posts

Which property was added??
Joshua Asbury
RE: Removing Default @domain.com From Login
August 8, 2008 11:01 AM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 495

Join Date: September 8, 2006

Recent Posts

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
Jaime Israel Ramírez Hernández
RE: Removing Default @domain.com From Login
August 8, 2008 12:08 PM
Answer

Jaime Israel Ramírez Hernández

Rank: Regular Member

Posts: 115

Join Date: April 14, 2008

Recent Posts

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!!!
Joshua Asbury
RE: Removing Default @domain.com From Login
August 8, 2008 12:15 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 495

Join Date: September 8, 2006

Recent Posts

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.
Jaime Israel Ramírez Hernández
RE: Removing Default @domain.com From Login
August 8, 2008 12:52 PM
Answer

Jaime Israel Ramírez Hernández

Rank: Regular Member

Posts: 115

Join Date: April 14, 2008

Recent Posts

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)