29 May
2007
29 May
'07
12:33 p.m.
I'm using drupal_execute() to save a CCK node. I'm trying to save the node on behalf of a different user (different than the current user). However, I don't manage to set the ownership of the node. Was anyone able to do such a thing? This is how I try to do it: $title = 'The node's '; $name = 'usernameA'; // the owner ti be, not the current user $uid = 23; // the user's uid $node = array('type' => 'article', 'uid'=>$uid,'name'=>'$name'); drupal_execute('organization_node_form',array('title'=>$title,'op'=>'submit'),$node); What I get is a node with an anonymous owner... Thanks, Zohar