fixing bugs in get-projects-for-user: wasnt using index in query, checking for REAL cursor in results, also checking empty results before loop.