Foros de discusión

LDAP - Advanced filter settings

thumbnail
Manuel Hoyos, modificado hace 9 años.

LDAP - Advanced filter settings

Junior Member Mensajes: 60 Fecha de incorporación: 11/06/12 Mensajes recientes
Hi!

Is it possible to add more than one filter to import users from ldap ? That is to add more than one criterion to property ldap.import.user.search.filter criteria to refine imported users.

Thanks!!!
thumbnail
Christoph Rabel, modificado hace 9 años.

RE: LDAP - Advanced filter settings

Liferay Legend Mensajes: 1554 Fecha de incorporación: 24/09/09 Mensajes recientes
I am not sure if I understand this request correctly.
Why don't you just add both criteria to the filter?
thumbnail
Manuel Hoyos, modificado hace 9 años.

RE: LDAP - Advanced filter settings

Junior Member Mensajes: 60 Fecha de incorporación: 11/06/12 Mensajes recientes
OK ,

I tried to add two conditions to filter .

ie-

ldap.import.user.search.filter = ( objectClass = inetOrgPerson ) ( EmployeeType = external)

Is it possible?

There any connector ?

thank you
thumbnail
Christoph Rabel, modificado hace 9 años.

RE: LDAP - Advanced filter settings

Liferay Legend Mensajes: 1554 Fecha de incorporación: 24/09/09 Mensajes recientes
You need to write it this way:
AND:
(&( objectClass = inetOrgPerson ) ( EmployeeType = external))
OR:
(| (objectClass = inetOrgPerson ) ( EmployeeType = external))

Basically it is something like:
(Operator(A)(B )(C))

It is recursive, so you could do something like:

(&( (| (objectClass = inetOrgPerson ) ( EmployeeType = external)) ) ( EmployeeType = something))

hth
thumbnail
Ravi Kumar Gupta, modificado hace 9 años.

RE: LDAP - Advanced filter settings

Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
Any valid filter should work. The best would be to search manually on your ldap and see what is the correct filter to be used. You should be able to verify the results for the filter. Remember, wildcards like * work with filters. You could also try like (objectClass=*)...

In the code above, you should use like this..
If you need both -- like mandatory
(&( objectClass = inetOrgPerson )( EmployeeType = external))