move getEmailFromUid to common