def getContactUIDForUser(self):
        """get the UID of the contact associated with the authenticated user
        """
        mt = getToolByName(self, 'portal_membership')
        user = mt.getAuthenticatedMember()
        user_id = user.getUserName()
        pc = getToolByName(self, 'portal_catalog')
        r = pc(portal_type='Contact',
               getUsername=user_id)
        if len(r) == 1:
            return r[0].UID
def getContactUIDForUser ( self ) : mt = getToolByName ( self , 'portal_membership' ) user = mt . getAuthenticatedMember ( ) user_id = user . getUserName ( ) pc = getToolByName ( self , 'portal_catalog' ) r = pc ( portal_type = 'Contact' , getUsername = user_id ) if len ( r ) == 1 : return r [ 0 ] . UID
get the UID of the contact associated with the authenticated user