# Issue merging user accounts, web interace and rake console

**URL:** https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938
**Category:** Support
**Tags:** merge-user
**Created:** [February 2, 2024, 5:12pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938 "2024-02-02T17:12:25Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![cmahns](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmahns/32/329271_2.png) [@cmahns](https://meta.discourse.org/u/cmahns)
#### Post date: [February 2, 2024, 5:12pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/1 "2024-02-02T17:12:25Z")

</div>

Currently running into an issue of a failed user merge of a very active user account into a new user. The user no longer has access to the previous user account and email, and due to my instance being on Auth0 SSO (which I do not have access to) I need to merge the users.

This hangs running in the browser, and I seem to be unable to kick the merge off using the application console as well.

> **Error Log, from running rake users:merge**
>
> ```plaintext
> # rake users:merge['redacted-source-user','redacted-target-user'] --trace
> Plugin name is 'discourse-user-notes', but plugin directory is named 'discourse-staff-notes'
> ** Invoke users:merge (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Execute users:merge
> rake aborted!
> ArgumentError: topic
> /var/www/discourse/app/services/post_owner_changer.rb:12:in `block in initialize'
> /var/www/discourse/app/services/post_owner_changer.rb:11:in `each'
> /var/www/discourse/app/services/post_owner_changer.rb:11:in `initialize'
> /var/www/discourse/app/services/user_merger.rb:83:in `new'
> /var/www/discourse/app/services/user_merger.rb:83:in `change_post_owner'
> /var/www/discourse/app/services/user_merger.rb:71:in `block in move_posts'
> /var/www/discourse/app/services/user_merger.rb:69:in `each'
> /var/www/discourse/app/services/user_merger.rb:69:in `move_posts'
> /var/www/discourse/app/services/user_merger.rb:14:in `merge!'
> /var/www/discourse/lib/tasks/users.rake:57:in `block in <main>'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:279:in `block in execute'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:279:in `each'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:279:in `execute'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
> bin/rake:13:in `<top (required)>'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `load'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:23:in `run'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:492:in `exec'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:34:in `dispatch'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:28:in `start'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/exe/bundle:45:in `block in <top (required)>'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/exe/bundle:33:in `<top (required)>'
> /usr/local/bin/bundle:25:in `load'
> /usr/local/bin/bundle:25:in `<main>'
> Tasks: TOP => users:merge
> 
> ```

---

<div class="post-metadata">

### Author: ![cmahns](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmahns/32/329271_2.png) [@cmahns](https://meta.discourse.org/u/cmahns)
#### Post date: [March 13, 2024, 5:13pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/2 "2024-03-13T17:13:39Z")

</div>

Hate to bump this but still experiencing the same issue. Now getting a new Argument error after the rake aborted message though!

Including the two usernames in this next error log just to see if it’s somehow the user’s name that’s the issue.

> **Error log, from running rake users:merge**
>
> ````plaintext
> # rake users:merge['n_stylo','nat1'] --trace                                                                                                                
> Plugin name is 'discourse-user-notes', but plugin directory is named 'discourse-staff-notes'                                                                                                 
> ** Invoke users:merge (first_time)                                                                                                                                                           
> ** Invoke environment (first_time)                                                            
> ** Execute environment                                                                                                                                                                       
> ** Execute users:merge                                                                        
> rake aborted!                                                                                                                                                                                
> ArgumentError: topic (ArgumentError)                                                                                                                                                         
>                                                                                               
> raise ArgumentError.new(arg) if self.instance_variable_get("@#{arg}").blank?
> ^^^^^^^^^^^^^^^^^^^^^^                                                            
> /var/www/discourse/app/services/post_owner_changer.rb:12:in `block in initialize'
> /var/www/discourse/app/services/post_owner_changer.rb:11:in `each'                                                                                                                           
> /var/www/discourse/app/services/post_owner_changer.rb:11:in `initialize'                   
> /var/www/discourse/app/services/user_merger.rb:83:in `new'                                                                                                                                   
> /var/www/discourse/app/services/user_merger.rb:83:in `change_post_owner'                                                                                                                     
> /var/www/discourse/app/services/user_merger.rb:71:in `block in move_posts'                                                                                                                   
> /var/www/discourse/app/services/user_merger.rb:69:in `each'                                                                                                                                  
> /var/www/discourse/app/services/user_merger.rb:69:in `move_posts'                            
> /var/www/discourse/app/services/user_merger.rb:14:in `merge!'
> /var/www/discourse/lib/tasks/users.rake:57:in `block in <main>'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:279:in `block in execute'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:279:in `each'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:279:in `execute' 
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188:in `invoke'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:182:in `invoke_task'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block (2 levels) in top_level'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `each'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block in top_level'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:147:in `run_with_threads'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:132:in `top_level'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:83:in `block in run'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling'
> /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:80:in `run'
> bin/rake:13:in `<top (required)>'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/cli/exec.rb:58:in `load'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/cli/exec.rb:58:in `kernel_load'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/cli/exec.rb:23:in `run'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/cli.rb:451:in `exec'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/cli.rb:34:in `dispatch'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/cli.rb:28:in `start'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/exe/bundle:28:in `block in <top (required)>' 
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
> /usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/exe/bundle:20:in `<top (required)>'
> /usr/local/bin/bundle:25:in `load'
> /usr/local/bin/bundle:25:in `<main>'
> Tasks: TOP => users:merge```
> 
> ````

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 4, 2024, 10:59am UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/3 "2024-06-04T10:59:16Z")

</div>

Did you manage to get to the bottom of this in the end?

---

<div class="post-metadata">

### Author: ![cmahns](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmahns/32/329271_2.png) [@cmahns](https://meta.discourse.org/u/cmahns)
#### Post date: [October 1, 2024, 8:38pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/4 "2024-10-01T20:38:12Z")

</div>

I haven’t! Error is still ongoing for these two users

---

<div class="post-metadata">

### Author: ![cmahns](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmahns/32/329271_2.png) [@cmahns](https://meta.discourse.org/u/cmahns)
#### Post date: [April 2, 2025, 4:53pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/5 "2025-04-02T16:53:31Z")

</div>

Hate to bump this again, but it’s going on for another user on my instance. Error log below:

> **Error Log from running rake users:merge**
>
> root@forum-app:/var/www/discourse# rake users:merge[‘NikS’,‘NikS1’] --trace  
> Plugin name is ‘discourse-user-notes’, but plugin directory is named ‘discourse-staff-notes’  
> \*\* Invoke users:merge (first\_time)  
> \*\* Invoke environment (first\_time)  
> \*\* Execute environment  
> \*\* Execute users:merge  
> rake aborted!  
> ArgumentError: topic (ArgumentError)
> 
> ```
> raise ArgumentError.new(arg) if self.instance_variable_get("@#{arg}").blank?
> ^^^^^^^^^^^^^^^^^^^^^^
> 
> ```
> 
> /var/www/discourse/app/services/post\_owner\_changer.rb:12:in `block in initialize' /var/www/discourse/app/services/post_owner_changer.rb:11:in `each’  
> /var/www/discourse/app/services/post\_owner\_changer.rb:11:in `initialize' /var/www/discourse/app/services/user_merger.rb:84:in `new’  
> /var/www/discourse/app/services/user\_merger.rb:84:in `change_post_owner' /var/www/discourse/app/services/user_merger.rb:72:in `block in move\_posts’  
> /var/www/discourse/app/services/user\_merger.rb:70:in `each' /var/www/discourse/app/services/user_merger.rb:70:in `move\_posts’  
> /var/www/discourse/app/services/user\_merger.rb:14:in `merge!' /var/www/discourse/lib/tasks/users.rake:57:in `block in ’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:279:in `block in execute' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:279:in `each’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:279:in `execute' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke\_with\_call\_chain’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke\_with\_call\_chain’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke\_task’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run\_with\_threads’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:83:in `block in run’  
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:80:in `run’  
> bin/rake:13:in `<top (required)>' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:58:in `load’  
> /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:58:in `kernel_load' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:23:in `run’  
> /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli.rb:455:in `exec' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run’  
> /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch’  
> /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli.rb:35:in `dispatch' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start’  
> /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli.rb:29:in `start' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/exe/bundle:28:in `block in \<top (required)\>’  
> /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/friendly\_errors.rb:117:in `with_friendly_errors' /usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/exe/bundle:20:in `\<top (required)\>’  
> /usr/local/bin/bundle:25:in `load' /usr/local/bin/bundle:25:in `’  
> Tasks: TOP =\> users:merge

Not sure if there’s some other thing I need to do for users like this, source user is a 7 year old account with 834 posts made, target user has 162 posts.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 12, 2025, 7:50pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/6 "2025-05-12T19:50:08Z")

</div>

Sorry for the delay in responding. 🙏 This may be a shot in the dark but is the user notes warning at the top of each of these errors meaningful?

> [@cmahns](#):
>
> root@forum-app:/var/www/discourse# rake users:merge[‘NikS’,‘NikS1’] --trace  
> Plugin name is ‘discourse-user-notes’, but plugin directory is named ‘discourse-staff-notes’

I think I’ve seen a prior issue where the user notes plugin didn’t like not having its updated name. Could you amend it in your `app.yml`, rebuild, and see if that helps?

Here’s the one I was thinking of:

> [@User Notes plugin is breaking my site](https://meta.discourse.org/t/user-notes-plugin-is-breaking-my-site/237190/20):
>
> Even though they link to the same repository, the plugin breaks when it is installed in a plugin directory that is not called `discourse-user-notes`.
> 
> So Tobias, I want to bet you’re old school and still called it `discourse-staff-notes`, right?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 12, 2025, 9:28pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/7 "2025-05-12T21:28:01Z")

</div>

> [@JammyDodger](#):
>
> I think I’ve seen a prior issue where the user notes plugin didn’t like not having its updated name.

That was a client side issue.  
I’ve never seen that server-side warning indicating an actual problem. It’s just something that pops up every `rake` or `rails c` command line.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 12, 2025, 9:35pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/8 "2025-05-12T21:35:24Z")

</div>

I thought that too, but thought it worth a punt just in case. 🎲 🎲 🙂 User notes + merging seemed like it could be an unhappy marriage if there were any conflicts for some reason.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 13, 2025, 6:01am UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/9 "2025-05-13T06:01:04Z")

</div>

> [@JammyDodger](#):
>
> User notes + merging seemed like it could be an unhappy marriage

Yes, totally. It might be worth running the rake task with `LOAD_PLUGINS=0`

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 13, 2025, 7:06am UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/10 "2025-05-13T07:06:20Z")

</div>

Would you need to be mindful of other plugins that the user may have data for? Eg. Solved, ~~topic voting~~ \[1\], polls, etc

* * *

1. 

> [@Topic Votes don't transfer when merging accounts](https://meta.discourse.org/t/topic-votes-dont-transfer-when-merging-accounts/277376):
>
> Hello, I searched for a topic but couldn’t find one addressing the same issue I’m facing. When I merge an old account that has voted on many topics into a new account: The votes aren’t transferred. The vote count on threads remains unchanged, even though the merged old account no longer exists (since the old account is deleted after merging). Is there perhaps an option somewhere to address this, or do I need to fork the plugin to attempt a fix? I’m uncertain about the best way to resolve th…

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 14, 2025, 2:53pm UTC](https://meta.discourse.org/t/issue-merging-user-accounts-web-interace-and-rake-console/293938/11 "2025-05-14T14:53:28Z")

</div>

This may also be a good avenue to explore:

> [@I'm attempting to merge user accounts](https://meta.discourse.org/t/im-attempting-to-merge-user-accounts/342147/5):
>
> I finally determined that the hang was caused by the “from” user account having “orphaned” posts. By “orphaned”, I mean that there was a database entry for the post, but no entry for the topic associated with that post.
> 
> You can check for the presence of “orphan posts” in a given user’s account by running this [Data Explorer](https://meta.discourse.org/t/discourse-data-explorer/32566) query:
> 
> ```sql
> -- [params]
> -- integer :user_id
> 
> SELECT
> posts.id,
> posts.topic_id
> FROM
> posts
> WHERE
> posts.user_id = :user_id
> AND posts.topic_id NOT IN (
> SELECT
> topics.id
> FROM
> topics
> )
> 
> ```
> 
> After the orphan posts were removed from the database (thanks to the assistance from the Discourse team since we are using a [hosting plan](https://discourse.org/pricing)), I was able to successfully accomplish the account merge operation.
