My comment about not unique enough still holds with this I think... My main concern was that the "CalDav" provider would use the same username twice. This condition should stay but can you check the "calendarHome" or another unique field?