Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Silvano Fari
How to handle duplicate e-Mail Addresses in LDAP
February 15, 2011 12:29 AM
Answer

Silvano Fari

Rank: Junior Member

Posts: 58

Join Date: June 16, 2010

Recent Posts

Hi, I have bound LR to a AD which contains user with the same e-Mail addresses. If this makes sense is an other question, which I don't want to discuss.

My customer has this situation and so I want to find a way to live with this situation.

Since we use screen name for login I don't see any reason for having unique email addresses.

There must be a way to go around this restriction. Isn't it?
Jonas Yuan
RE: How to handle duplicate e-Mail Addresses in LDAP
February 15, 2011 7:50 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Silvalo,

Definitely, it can be done by a fix patch.

Is it your product? which version are you using? CE or EE?

Thanks

Jonas Yuan

==================
The Author of Liferay Books:
Liferay User Interface Development
Liferay Portal 6 Enterprise Intranets
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Silvano Fari
RE: How to handle duplicate e-Mail Addresses in LDAP
February 15, 2011 8:18 AM
Answer

Silvano Fari

Rank: Junior Member

Posts: 58

Join Date: June 16, 2010

Recent Posts

Hi Jonas

I am using CE. How do have to make the fix patch?

Thanks
Silvano
Jonas Yuan
RE: How to handle duplicate e-Mail Addresses in LDAP
February 15, 2011 11:10 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Silvano,

are you using CE 6.0.5?

The fix would be similar to this:

setting-up-users-screen-name-and-friendly-urls-in-your-own-languages

and these two posts

Keeping user password secure with LDAP integration

Speeding up LDAP import process and Liferay authentication

Thanks

Jonas
Silvano Fari
RE: How to handle duplicate e-Mail Addresses in LDAP
February 16, 2011 12:01 AM
Answer

Silvano Fari

Rank: Junior Member

Posts: 58

Join Date: June 16, 2010

Recent Posts

Hi Jonas

Thanks!
These are intresting articles about LDAP imports. But I don't understand exaclty what they have to do with my challenge of having duplicate e-Mail Addresses in LDAP and still be able to import the according users into liferay.

Best Regards
Silvano
Jonas Yuan
RE: How to handle duplicate e-Mail Addresses in LDAP
February 16, 2011 6:21 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Silvano,

duplicate e-Mail Addresses in LDAP could be handled in the same way:

1) use screen name for search filter.
2) handle duplicate e-Mail Addresses in LDAP when importing

Hope that it helps,

Jonas Yuan
Hubert Felber
RE: How to handle duplicate e-Mail Addresses in LDAP
February 21, 2011 9:33 AM
Answer

Hubert Felber

Rank: Regular Member

Posts: 157

Join Date: November 23, 2009

Recent Posts

Silvano,

You'd have to overwrite UserLocalServiceImpl, check places where DuplicateUserEmailAddressException() is thrown.
aand...there's a unique index in indexes.sql
1create unique index IX_615E9F7A on User_ (companyId, emailAddress);

You'd have to make this non unique
1create index IX_615E9F7A on User_ (companyId, emailAddress);

Which is very ugly and might get you into trouble one day if Liferay changes something.

In our company many users have 2 different account names with same email-address. We cannot change this and have to arrange with that. We authenticate via screenname and the email is just an attribute on the user.

It would be nice, if Liferay supported this better. I dunno why there has to be a unique index on (companyId, emailAddress)

Hubert
Ram A
RE: How to handle duplicate e-Mail Addresses in LDAP
February 5, 2013 2:33 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Jonas Yuan:
Hi Silvano,

duplicate e-Mail Addresses in LDAP could be handled in the same way:

1) use screen name for search filter.
2) handle duplicate e-Mail Addresses in LDAP when importing

Hope that it helps,

Jonas Yuan



Hi Jonas,

I am new to liferay. i am using liferay 6.0.6.

i am also facing this type of issue because of duplicate emailaddress.
i am getting the error "Cannot insert duplicate key row in object 'dbo.User_' with unique index 'IX_615E9F7A'. after importing the users and while adding it to DB.

How can we handle duplicate emailaddress while importing?
Can we filter the users if he has the duplicate emailAddress with the users already existed in Lifera DB?
Is it possible to achieve this using portal-ext.properties?


Thanks in advance
Ram A