Registered users need to post nodes of one specific Content Type - xyz - without their own UID / user name registered as the author.

However, before the uid is changed the user will be upgraded / have a role added by trigger action - this part is working fine.

Once the node has been saved the author's name needs to be changed automatically -

  1. either to Guest (anonymous) or
  2. to another user listed on the site for just this purpose

The reason for this is to allow users to add information without being personally linked to it. This could be a kind of whistle blowing feature, but in my case it is needed to allow users to share things like the cost of a service. If the information they provide could be linked to them they would not like to tell. The background is to bring more transparency into the world of particular professions in this case.
For example, we would all like to know how much it would cost to rent an apartment in a particular area. All we might find are the asking prices from various publications - but what did people actually sign up to. We all might be happy to tell you on a personal basis, but we would not like to post it on a popular site if it can be linked back to us.
So, if the process of supplying the information is removing our name from the data or changes it to anonymous we might not have a problem and help others to pay the fair market price. This will also help the "seller" (landlord) to understand what (s)he can realistically expect - not wasting time and money listing to the wrong advice trying to push up prices.
I'd be most grateful for any hints towards modules that can do this or using action triggers, etc.

Thanks

Comments

WorldFallz’s picture

You should be able to do this with the http://drupal.org/project/rules module or some custom code using http://api.drupal.org/api/function/hook_nodeapi in a little custom module.

tryitonce’s picture

Thanks Joann,

I have been tinkering and trying all sorts of tricks with Rules. But it seems only to offer me a choice of active user and creator (which is the same user for my little project).

Unfortunately I am not writing modules and the hook_nodeapi route is not for me - unless I ask someone to do it. I will put this off for a bit as there is no budget for this project.

Let's see, maybe someone comes across my search with the right idea and pointer.

Maybe I am also too new to Rules and with more experience it would just be a simple thing. I hope to report back before too long with some solution and are still looking for some clever little hint that will take me another step along the way.

WorldFallz’s picture

Instead of using the 'set the content author' action, use the php code option-- then you can set the author to anyone you want with $node->uid = 0 where '0' is the userid of the user you want to be the author (0 = 'anonymous').

tryitonce’s picture

Thanks for the great help.

I will work my way through Rules a bit more and shall be happy top report back how it will pan out. In case I forget to report back and this is of interest to someone - do remind me.

Good luck to everyone and happy NY 2010