Fórum

RE: How to handle duplicate e-Mail Addresses in LDAP

Silvano Fari, modificado 13 Anos atrás.

How to handle duplicate e-Mail Addresses in LDAP

Junior Member Postagens: 58 Data de Entrada: 16/06/10 Postagens Recentes
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?
thumbnail
Jonas Yuan, modificado 13 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Liferay Master Postagens: 993 Data de Entrada: 27/04/07 Postagens Recentes
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, modificado 13 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Junior Member Postagens: 58 Data de Entrada: 16/06/10 Postagens Recentes
Hi Jonas

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

Thanks
Silvano
thumbnail
Jonas Yuan, modificado 13 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Liferay Master Postagens: 993 Data de Entrada: 27/04/07 Postagens Recentes
Silvano Fari, modificado 13 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Junior Member Postagens: 58 Data de Entrada: 16/06/10 Postagens Recentes
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
thumbnail
Jonas Yuan, modificado 13 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Liferay Master Postagens: 993 Data de Entrada: 27/04/07 Postagens Recentes
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
Ram A, modificado 11 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Junior Member Postagens: 76 Data de Entrada: 16/01/13 Postagens Recentes
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
Hubert Felber, modificado 13 Anos atrás.

RE: How to handle duplicate e-Mail Addresses in LDAP

Regular Member Postagens: 157 Data de Entrada: 23/11/09 Postagens Recentes
Silvano,

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

You'd have to make this non unique
create 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