Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete user doesn't remove relevant user meta from database #1365

Closed
prykon opened this issue May 13, 2021 · 0 comments · Fixed by #1404
Closed

Delete user doesn't remove relevant user meta from database #1365

prykon opened this issue May 13, 2021 · 0 comments · Fixed by #1404
Assignees
Labels

Comments

@prykon
Copy link
Collaborator

prykon commented May 13, 2021

WP Admin screen user delete doesn't remove all relevant user meta

To Reproduce

  1. Go to any contact that doesn't have a user created
  2. Click on 'Make a user from this contact' from the 'Admin actions' dropdown
  3. Complete the form and create the user
  4. Go to the WP Admin and delete the user
  5. Repeat step 2 for the same user.

Expected behavior
It should allow you to create a user from the contact. Instead, it says there's already a user created from the contact.

@micahmills micahmills added the bug label May 14, 2021
@micahmills micahmills self-assigned this May 31, 2021
@corsacca corsacca linked a pull request Jun 1, 2021 that will close this issue
corsacca pushed a commit that referenced this issue Jul 30, 2021
* adds a function on the 'delete_user' hook to delete the 'correspons_to_user' meta key and value.

* moved the function to dt-users/users.php and changed it to use the `deleted_user` so it should run on multisite setups.

* Added a function to delete a user from all sites if it is multisite and the user is deleted by a Super Admin.

* fixed bug on non-multisite deletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants