code: def _unlinkUser(self):
          
          KEY = "linked_contact_uid"
  
          # Nothing to do if no user is linked
          if not self.hasUser():
              return False
  
          user = self.getUser()
          username = user.getId()
  
          # Unset the UID from the User Property
          user.setMemberProperties({KEY: ""})
          logger.info("Unlinked Contact UID from User {}"
                      .format(user.getProperty(KEY, "")))
  
          # Unset the Username
          self.setUsername(None)
  
          # Unset the Email
          self.setEmailAddress(None)
  
          # somehow the `getUsername` index gets out of sync
          self.reindexObject()
  
          # N.B. Local owner role and client group applies only to client
          #      contacts, but not lab contacts.
          if IClient.providedBy(self.aq_parent):
              # Revoke local Owner role
              self._delLocalOwnerRole(username)
              # Remove user from "Clients" group
              self._delUserFromGroup(username, group="Clients")
  
          return True
docs: Remove the UID of the current Contact in the User properties and
          update all relevant own properties.