Search for projects using ldap_list, part two.

This is a continuation of change Ida578039f7395f88c2339d209bb14aa235696987
... Last time I fixed this for the 'can see all projects' code path but not
for the more commonly used normal user path.

For bug 47101.

Change-Id: I778fb78c1d877db1e3279aeadaaf2edde96ce32c