Changing User Name in Several Articles
Posted Nov 23, 2011 - 5:50 PM:
I changed the user name for a submitter with over 150 articles. The articles themselves still show the old user name under the byline. Apart from doing an edit/resave for each article (which works great) is there a faster way?
How about running both of these search-and-replace operations in MySQL:
UPDATE wsnkb_links SET ownername = replace(ownername, "Old Name", "New Name");
UPDATE wsnkb_links SET lastpostername = replace(lastpostername, "Old Name", "New Name");
... or would just the first operation do the trick. The ones I did by hand show the correct name under "ownername", but the "lastpostername" still shows the old name.
Even after regeneration, the "ownername" is still the old user name except within the articles that I edited and re-saved.
I see there's a bug with regeneration when a listing has an address which is preventing it from updating the ownername in 6.2, fixed for next release. Don't see what the problem in 6.1 could be though, the regeneration did update the name for me there.
0/5
1
2
3
4
5
Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.
Comments on Changing User Name in Several Articles
Member
Usergroup: Customer
Joined: Jan 13, 2008
Total Topics: 8
Total Comments: 12
Posted Nov 23, 2011 - 5:50 PM:
I changed the user name for a submitter with over 150 articles. The articles themselves still show the old user name under the byline. Apart from doing an edit/resave for each article (which works great) is there a faster way?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Regenerating them at Admin -> Maintenance -> Regenerate should fix it.
Member
Usergroup: Customer
Joined: Jan 13, 2008
Total Topics: 8
Total Comments: 12
Unfortunately, that doesn't work. The byline still shows the old name (even after selecting "Update everything". :-(
Member
Usergroup: Customer
Joined: Jan 13, 2008
Total Topics: 8
Total Comments: 12
How about running both of these search-and-replace operations in MySQL:
UPDATE wsnkb_links SET ownername = replace(ownername, "Old Name", "New Name");
UPDATE wsnkb_links SET lastpostername = replace(lastpostername, "Old Name", "New Name");
... or would just the first operation do the trick. The ones I did by hand show the correct name under "ownername", but the "lastpostername" still shows the old name.
Even after regeneration, the "ownername" is still the old user name except within the articles that I edited and re-saved.
Member
Usergroup: Customer
Joined: Jan 13, 2008
Total Topics: 8
Total Comments: 12
Found the easy answer:
Admin ==> Advanced Options ==> Perform Mass Alterations
Worked like a charm and I didn't have to worry about the MySQL syntax.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I see there's a bug with regeneration when a listing has an address which is preventing it from updating the ownername in 6.2, fixed for next release. Don't see what the problem in 6.1 could be though, the regeneration did update the name for me there.