code: def get_user(user=None):
      
      if user is None:
          # Return the current authenticated user
          user = getSecurityManager().getUser()
      elif isinstance(user, MemberData):
          # MemberData wrapped user -> get the user object
          user = user.getUser()
      elif isinstance(user, basestring):
          # User ID -> get the user
          user = get_member_by_login_name(get_portal(), user, False)
          if user:
              user = user.getUser()
      return user
docs: Get the user object
  
      :param user: A user id, memberdata object or None for the current user
      :returns: Plone User (PlonePAS) / Propertied User (PluggableAuthService)