22 Mar
2011
22 Mar
'11
3:48 p.m.
Hi, I need a custom field for my users. So I created a computed_field in everyone's content_profile, so far so good. Now the problem is when I want to recompute that field from another user's action, it seems it fails because of the permissions. Here's a part of the code: foreach($comptes as $uid => $val) { $result = db_query("SELECT name from {users} where uid = '%d'", $uid); $user = drupal_unpack(db_fetch_object($result)); $profilnode = content_profile_load('profile', $uid); if($profilnode) node_save($profilnode); /* update the computed_field */ } How can I bypass the permissions system to make node_save() work ? I'm using Drupal 6. Thanks, Xav PS: please Cc: me on answers