Title: Database error when delete user
Last modified: October 16, 2022

---

# Database error when delete user

 *  Resolved [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/)
 * Hello,
 * Whenever you delete a user (like via the WP Users screen), the following error
   occurs:
 * `AH01071: Got error 'PHP message: WordPress database error Duplicate entry ''
   for key 'email' for query UPDATE wp_edd_customers SET user_id = 0, email = '',
   name = 'Pat Smith', status = 'active', purchase_value = '0', purchase_count ='
   0', date_created = '2022-10-13 16:21:47', date_modified = '2022-10-16 19:53:20',
   uuid = 'urn:uuid:123-000-123-abc-xyz' WHERE id = '1234' made by wp_delete_user,
   do_action('delete_user'), WP_Hook->do_action, WP_Hook->apply_filters, edd_detach_deleted_user,
   EDD_Customer->update, edd_update_customer, do_action('edd_customer_updated'),
   WP_Hook->do_action, WP_Hook->apply_filters, edd_process_customer_updated, EDD\\
   Database\\Query->update_item'`
    -  This topic was modified 3 years, 7 months ago by [Jeff Starr](https://wordpress.org/support/users/specialk/).
    -  This topic was modified 3 years, 7 months ago by [Jeff Starr](https://wordpress.org/support/users/specialk/).
    -  This topic was modified 3 years, 7 months ago by [Jeff Starr](https://wordpress.org/support/users/specialk/).
    -  This topic was modified 3 years, 7 months ago by [Jeff Starr](https://wordpress.org/support/users/specialk/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Chris Klosowski](https://wordpress.org/support/users/cklosows/)
 * (@cklosows)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/#post-16123622)
 * [@specialk](https://wordpress.org/support/users/specialk/) Can you confirm by
   looking in the database, if this user may have had multiple customer accounts
   somehow?
 *  Thread Starter [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/#post-16123631)
 * As far as I know, it’s any/all registered users that have their purchases/orders
   deleted. For example Pat has one order. Delete Pat’s order, then delete Pat will
   trigger the error.
 *  Plugin Contributor [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * (@misulicus)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/#post-16124191)
 * I’m not able to replicate this on my end at all. Tried deleting the order, then
   the WP user account and then the Customer record.
 *  Thread Starter [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/#post-16125090)
 * It may be an issue specifically with Software Licensing. I will test further 
   and report back.
 *  Plugin Contributor [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * (@misulicus)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/#post-16165699)
 * Hey [@specialk](https://wordpress.org/support/users/specialk/)
 * Can we mark this as resolved and if needed you can open a new topic? If it’s 
   an issue related to a premium extension then please open a support topic with
   our team.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Database error when delete user’ is closed to new replies.

 * ![](https://ps.w.org/easy-digital-downloads/assets/icon.svg?rev=3455837)
 * [Easy Digital Downloads – eCommerce Payments and Subscriptions made easy](https://wordpress.org/plugins/easy-digital-downloads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-digital-downloads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-digital-downloads/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-digital-downloads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-digital-downloads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-digital-downloads/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/database-error-when-delete-user/#post-16165699)
 * Status: resolved