"(&(uid="+principal.getName()+")(objectclass=jetspeeduser))", ATTRS, true);
}
catch (Exception e)
{
logger.error( "Failed to retrieve user '" + principal.getName() + "'", e );
throw new UserException("Failed to retrieve user '" + principal.getName() + "'", e);
}
if (userurls.size() == 1)
{
user = new LDAPUser((LDAPURL) ((Vector)userurls.elementAt(0)).firstElement());
return user;
}
else if(userurls.size() > 1)
{
throw new UserException("Multiple Users with same username '" + principal.getName() + "'");
}
else
{
throw new UnknownUserException("Unknown user '" + principal.getName() + "'");
}