code: def setUser(self, user_or_username):
          
          user = None
          userid = None
  
          # Handle User IDs (strings)
          if isinstance(user_or_username, types.StringTypes):
              userid = user_or_username
              user = api.user.get(userid)
          # Handle User Objects (MemberData/PloneUser)
          if hasattr(user_or_username, "getId"):
              userid = user_or_username.getId()
              user = user_or_username
  
          # Not a valid user
          if user is None:
              return False
  
          # Link the User
          return self._linkUser(user)
docs: Link the user to the Contact
  
          :returns: True if OK, False if the User could not be linked
          :rtype: bool