Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Thiago Esteves
i've got an UserScreenNameException while trying to authenticate anto my A
July 24, 2009 12:22 PM
Answer

Thiago Esteves

Rank: Junior Member

Posts: 31

Join Date: June 24, 2009

Recent Posts

Hello everybody,

While trying to authenticate an user from my local AD I got an UserScreenNameException.

18:27:50,985 ERROR [PortalLDAPUtil:911] Problem adding user with screen name ad_access and email address ad_access@gravames.local
com.liferay.portal.UserScreenNameException
at com.liferay.portal.service.impl.UserLocalServiceImpl.validateScreenName(UserLocalServiceImpl.java:3372)
at com.liferay.portal.service.impl.UserLocalServiceImpl.validate(UserLocalServiceImpl.java:3265)
at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)


Doesn't liferay accept screen names with the _ character?


Thanks in advance,
Thiago
Zsolt Balogh
RE: i've got an UserScreenNameException while trying to authenticate a
July 24, 2009 12:56 PM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 463

Join Date: March 23, 2009

Recent Posts

Hi,

You should use the LiberalScreenNameValidator.

Put the next line in the portal-ext.properties:
1users.screen.name.validator=com.liferay.portal.security.auth.LiberalScreenNameValidator


(Default ScreenNameValidator does not accept screen names with underlines)

Restart your app server and it will work.
jihad Aravassery
RE: i've got an UserScreenNameException while trying to authenticate a
August 31, 2009 12:21 AM
Answer

jihad Aravassery

Rank: New Member

Posts: 2

Join Date: December 8, 2008

Recent Posts

While trying to import a screen name with digits only am getting the similar exception. say for eg if my screen name is 200912344. i am getting the above mentioned exception.

My portal-ext.properties contain this below line
users.screen.name.validator = com.liferay.portal.security.auth.LiberalScreenNameValidator

Please help
Zsolt Balogh
RE: i've got an UserScreenNameException while trying to authenticate a
August 31, 2009 1:41 AM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 463

Join Date: March 23, 2009

Recent Posts

The screen name shouldn't be a number except when it's the user's id. This is hard-coded and can't be configured. emoticon

1if (Validator.isNumber(screenName) &&
2            !screenName.equals(String.valueOf(userId))) {
3
4            throw new UserScreenNameException();
5        }
Zsolt Balogh
RE: i've got an UserScreenNameException while trying to authenticate a
August 31, 2009 1:57 AM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 463

Join Date: March 23, 2009

Recent Posts

I've created a patch which will help to find out what the problem is.

LPS-4737
jihad Aravassery
RE: i've got an UserScreenNameException while trying to authenticate a
May 18, 2012 7:43 AM
Answer

jihad Aravassery

Rank: New Member

Posts: 2

Join Date: December 8, 2008

Recent Posts

Thanks for implementing this in new versions of liferay