def update_user(user, options={}, &block)
      raise 'Error: Param user is nil!' if user.nil?

      builder = Builder::User.new
      block.call(builder)
      url = if user.is_a?(Resource::User) && user.uri
              url_for_resource(user)
            else
              url_for_uri(user)
            end

      begin
        client.put(url, builder.to_xml, options) do |response|
          a_hash = parse response
          Resource::User.from_coach a_hash
        end
      rescue => e
        raise e if debug
        false
      end
    end
def update_user(user, options={}, &block)
      raise 'Error: Param user is nil!' if user.nil?

      builder = Builder::User.new
      block.call(builder)
      url = if user.is_a?(Resource::User) && user.uri
              url_for_resource(user)
            else
              url_for_uri(user)
            end

      begin
        client.put(url, builder.to_xml, options) do |response|
          a_hash = parse response
          Resource::User.from_coach a_hash
        end
      rescue => e
        raise e if debug
        false
      end
    end
Updates a user.

 @param [User|String] user
 @param [Hash] options
 @param [Block] block
 @return [User]

 ====Examples
 @example
   @coach.update_user(user) do |user
     user.real_name= 'the hoff'
     user.password= 'test'
     user.email= 'test@test.com'
     user.public_visible= 2
   end