We have a website which will host lots of species information. A resource is entering the data on behalf of another person. I would like to change the author information of the nodes once the data entry is completed.

Is it possible to replace all instances of the author ID of 'Person A' with 'Person B'? I assume we need to write some database query and run it in the phpMyAdmin. What query it would be? Also, is there any other efficient way?



The easiest way I think is this:

  1. Install the views, views_bulk_operations, and admin_views modules.
  2. Go to the content listing (admin/content).
  3. Filter the results to get the nodes you are interested in.
  4. Check the checkboxes next to the node (there is also an option to select all).
  5. Select "Change author" from the operations dropdown and click the "Execute" button.
  6. Select the user you want to change the author to and click the "Next" button.

Admin views uses views bulk operations to override the default drupal administration views with something a lot more useful.

  • agreed, views bulk operations was a nice quick solution, then easy to disable if not needed afterwards – ben.hamelin Nov 2 '16 at 17:14
  • @rooby I am using commerce_kickstart. I do not see any option to change author – Umair Mar 18 '18 at 11:21
  • @Umair it's possible you don't have all 3 of the modules mentioned in step 1. If you have the admin_views module enabled the operation will be called 'Change author', if not it will be called 'Change the author of content'. – rooby Mar 18 '18 at 14:12
  • @rooby I have all 3 modules, but there is no such option. I went to the view of "admin/content" and changed the setting under "Bulk operations:Content". I have a new problem now drupal.org/project/commerce_kickstart/issues/2954257 – Umair Mar 19 '18 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.