code: def unlinkUser(self, delete=False):
          
          userid = self.getUsername()
          user = self.getUser()
          if user:
              logger.debug("Unlinking User '{}' from Contact '{}'".format(
                  userid, self.Title()))
  
              # Unlink the User
              if not self._unlinkUser():
                  return False
  
              # Also remove the Plone User (caution)
              if delete:
                  logger.debug("Removing Plone User '{}'".format(userid))
                  api.user.delete(username=userid)
  
              return True
          return False
docs: Unlink the user to the Contact
  
          :returns: True if OK, False if no User was unlinked
          :rtype: bool