def getParticipantAvatar(pData):
    """
    Build the avatar URL for a participant.
    """
    gravatarBase = 'http://www.gravatar.com/avatar/{}?d=identicon'
    
    # Note the 'or' here. If the player has no email hash, we use their
    # participant ID as a unique Gravatar hash.
    return gravatarBase.format(pData['email-hash'] or pData['id'])