Hi, thank you for the great module.
sorry if this has been answered (searched forums, googled).

Is there a way to change comment author just like node author?

I've tried the (node_assign_owner_action) on views type as node - gives errors, and then views type as comments - no errors when doing this way but the comment author is still the old one.

Thank you!

If you need more info please ask and sorry about the english, not my native. :P

Comments

infojunkie’s picture

Version: 6.x-3.x-dev » 6.x-1.x-dev
Component: User interface » Actions
Category: support » feature

VBO 6.x-1.10-beta2 and above support both Views 2.x and 3.x. VBO 6.x-3.x is discontinued.

Pierre_G’s picture

I tried to do it as well, but the function seems to not be implemented yet.

Here is a temporary solution, working directly with the database :

Use a PHP input format on a page you create, and type this for the content :

<?php
$connection = mysql_connect("host","username","password");
mysql_select_db("database_name") or die ('connection error');
if (mysql_query("UPDATE comments SET uid=[new_uid], name='[new_username]' WHERE uid=[old_uid]")) {
echo "request done !";
} else {
echo "request error...";
}
?>

host / username / password / database_name : replace by your database connection informations
[new_uid] : the user id of the new author of the comment
[new_username] : the username of the new author (must correspond to the uid) - check in the base for previously comments or node from this user to get the right name
[old_uid] : the user id of the author you want to replace

WARNING : this will change ALL the comments made by the author with the [old_uid].
If you want more precise control, you'll need to make a better sql request ;)

(don't forget to include any prefix you may have before the table name "comments" ie. "drupal_comments")

janis_lv’s picture

thank you for the reply, I executed the mysql query part in mysql-console and comments are where they need to be.

my scenario was the simple one, from 1 user all comments to another user.
(user 1 was my account for some time :D, but then learning drupal I got to point where I understand that I need another account for daily use).

thanks again.

th.sigit’s picture

@Pierre G:

Thanks, you saved my day :D

Like Janis, I executed the query in phpmyadmin and now I am good to go.

I dit it two steps, actually (still learning to this)

UPDATE comments SET uid=4 WHERE uid=0
UPDATE comments SET name='vjogja' WHERE name='devel generate'

* Arrived here from a search on google

tschenz’s picture

I'd like to add that this is a feature which I thought would be in the module.

Also ( and this may be related), if I add a filter for Comment:Author, the view disappears entirely - no hits.

infojunkie’s picture

People here are welcome to submit a patch for an action that implements this. I doubt I'll do it myself.

infojunkie’s picture

Status: Active » Postponed
WeRockYourWeb.com’s picture

Subscribing, looking for a similar feature and willing to sponsor a patch or module that accomplishes this (mass changing of author names on comments).

kenorb’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)
kay_v’s picture

for those interested:

the contrib module change_author_action works with D9 and handles bulk NODE author changes reasonably elegantly - at least so far in a brief test drive with 3k nodes; will report back once it faces some comments (not available in the current project).

graber’s picture

@kay_v, does it work with VBO?