Drupal 6: Modifying uid of a submitted node 
I have a situation where I want a set of users (employees) to be able to create a node, but to replace the uid (user ID) with that of the users profile currently displayed.

In other words, I have a block that that calls a form for a content type. If an employee (uid = 20) goes to a clients page (uid =105), and fills out the form, I want the uid associated with the form to be the client's(105), not the employee's. 

I'm using arg(1) to grab the Client's uid - here is what I have..

    <?php
    
    global $user;
    //test to make sure arg(1) is pulling correct uid
    //print arg(1);
    
    
    $new_SR = new stdClass();
    $new_SR->type = 'service_request';
    $new_SR->uid = arg(1);
    
    module_load_include('inc', 'node', 'node.pages');
    $output .= drupal_get_form('service_request_node_form', $new_SR);
    
    return $output;
    ?>

The form is loading in the block, but when submitted, is still showing the employee uid. I don't want to use hook_form_alter because I don't want to modify the actual form, because clients can fill out the form directly, in this case, I don't want to modify the form at all.

I'm also ashamed that I'm putting this in a block, but I couldn't think of a way to put this in a module, so any suggestions on that would also be appreciated...
Drupal 6: Modifying uid of a submitted node 
===

I have a situation where I want a set of users (employees) to be able to create a node, but to replace the uid (user ID) with that of the users profile currently displayed.

In other words, I have a block that that calls a form for a content type. If an employee (uid = 20) goes to a clients page (uid =105), and fills out the form, I want the uid associated with the form to be the client's(105), not the employee's. 

I'm using arg(1) to grab the Client's uid - here is what I have..

    <?php
    
    global $user;
    //test to make sure arg(1) is pulling correct uid
    //print arg(1);
    
    
    $new_SR = new stdClass();
    $new_SR->type = 'service_request';
    $new_SR->uid = arg(1);
    
    module_load_include('inc', 'node', 'node.pages');
    $output .= drupal_get_form('service_request_node_form', $new_SR);
    
    return $output;
    ?>

The form is loading in the block, but when submitted, is still showing the employee uid. I don't want to use hook_form_alter because I don't want to modify the actual form, because clients can fill out the form directly, in this case, I don't want to modify the form at all.

I'm also ashamed that I'm putting this in a block, but I couldn't think of a way to put this in a module, so any suggestions on that would also be appreciated...