changed the query to get all the groups joined by the user