if (filter != null && filter.getUserType().equals(UserDao.TYPE_STUDENT) &&
if (filter != null && UserDao.TYPE_STUDENT.equals(filter.getUserType()) &&
	public Collection getUsers(UserFilter filter) throws NamingException {	    ArrayList result = new ArrayList();		Attributes matchAttrs = new BasicAttributes(true);		if (filter != null) {			if (UserDao.TYPE_ADMIN.equals(filter.getUserType()))				matchAttrs.put(new BasicAttribute("gidNumber","150"));			else if (UserDao.TYPE_TEACHER.equals(filter.getUserType()))				matchAttrs.put(new BasicAttribute("gidNumber","801"));			else if (UserDao.TYPE_STUDENT.equals(filter.getUserType()) &&			        filter.getIdFormation() != null)			    matchAttrs.put(new BasicAttribute("gidNumber",filter.getIdFormation()));		    if (filter.getName() != null)		        matchAttrs.put(new BasicAttribute("sn",filter.getName()));		    if (filter.getFirstName() != null)		        matchAttrs.put(new BasicAttribute("givenName",filter.getFirstName()));		    if (filter.getEMail() != null)		        matchAttrs.put(new BasicAttribute("mail",filter.getEMail()));		    if (filter.getIdUser() != null)		        matchAttrs.put(new BasicAttribute("uidNumber",filter.getIdUser()));		    if (filter.getLogin() != null)		        matchAttrs.put(new BasicAttribute("uid",filter.getLogin()));		}		NamingEnumeration items = search(DatabasesProperties.getLdapDNBase("users"),matchAttrs);				while (items != null && items.hasMore()) {			SearchResult sr = (SearchResult)items.next();			User person = new User();						Attributes attrs = sr.getAttributes();			Attribute tmp = attrs.get("gidNumber");			if (filter != null && filter.getUserType().equals(UserDao.TYPE_STUDENT) &&					(((String)tmp.get()).equals("150") || ((String)tmp.get()).equals("801")))				continue;			tmp = attrs.get("sn");			if (tmp != null)			    person.setName((String) tmp.get());			tmp = attrs.get("givenName");			if (tmp != null)				person.setFirstName((String) tmp.get());			tmp = attrs.get("mail");			if (tmp != null)				person.setEMail((String) tmp.get());			tmp = attrs.get("uidNumber");			if (tmp != null)				person.setIdUser(new Long((String) tmp.get()));			if (filter != null)				person.setUserType(filter.getUserType());			result.add(person);		}		return result;	}