Hi,

I'm using drupal_execute() to execute the form for a specific node type. I can set all the values of the node type and the new node gets created. However, I have one problem. The owner (uid) of this new node is always the user who executes the PHP script. I tried to set a different username and uid in the values array, but with no visible effect. On the other hand, drupal_execute() also doesn't return the newly created node so I have no way to change the owner after the node was created.

Any suggestions how I can set a specific user during node creation?

Thanks,

Sebastian

Comments

advseb’s picture

Ok, while doing additional searching in the forum I found that the node will always be owned by the user running drupal_execute(). See here for example:

http://drupal.org/node/131704#comment-807908

Sebastian