[Building Sakai] Get multiple e-mails from LDAP

Dan McCallum dmccallum at unicon.net
Thu Oct 20 17:06:29 PDT 2011


You'll need to extend SimpleLdapAttributeMapper to override 
mapLdapAttributeOntoUserData(LDAPAttribute, LdapUserData, String). 
Currently that method has no special handling for multi-valued 
attributes; it always grabs the first value. Check the Novell javadoc 
[1, 2] for getting at all values in an attribute.

- Dan

1 - http://developer.novell.com/documentation/jldap/jldapenu/api/index.html
2 - 
http://developer.novell.com/documentation/jldap/jldapenu/api/com/novell/ldap/LDAPAttribute.html#getStringValueArray%28%29

On 10/20/2011 05:36 AM, Rosa María Silveira Puertas wrote:
> Hi all!
>
> We have an LDAP attribute that contains a list of e-mails.
>
> Now Sakai does this:
>
> 1.Sakai uses getEmail method for asking LDAP the user’s e-mail
>
> 2.getEmail method asks LDAP for the attritute mapped at XML
> jldap-beans.xml file
>
> 3.LDAP returns the first e-mail from the list
>
> 4.getEmail method returns that value
>
> But we would like to have this behavior:
>
> 1.Sakai uses getEmail method for asking LDAP the user’s e-mail
>
> 2.getEmail method asks LDAP for the attritute mapped at XML
> jldap-beans.xml file
>
> 3.LDAP returns *the entire list of e-mails*
>
> 4.getEmail method returns one of the user’s e-mail according to a new
> sakai propertie
>
> Any idea of how getting the entire list of e-mails from LDAP?
>
> Thanks and best regards, Rosa
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"




More information about the sakai-dev mailing list