Article ID: 121296, created on Apr 24, 2014, last review on Oct 27, 2016

  • Applies to:
  • Operations Automation
  • Business Automation

Symptoms

Attempt to delete a user fails with one of the error messages below:

1) ODBC code #23503: ERROR: update or delete on table "Users" violates foreign key constraint "AcceptedTerms_UsersID" on table "AcceptedTerms" Key (UsersID)=([user_id]) is still referenced from table "AcceptedTerms".; Error while executing the query

2) ODBC error #23000: [Microsoft][ODBC SQL Server Driver][SQL Server]The DELETE statement conflicted with the REFERENCE constraint "ARDoc_Crtd_User_UsersID". The conflict occurred in database "pba", table "dbo.ARDoc", column 'Crtd_User_UsersID'.ODBC error #01000: [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.ODBC error #01000:

ODBC code #23503: ERROR: update or delete on "Users" violates foreign key constraint "ARDoc_Crtd_User_UsersID" on "ARDoc" Key (UsersID)=(xxxx) is still referenced from table "ARDoc"

3) ODBC code #23503: ERROR: update or delete on "Users" violates foreign key constraint "ADomain_OwnerUsersID" on "ADomain" Key (UsersID) is still referenced from table "ADomain"

4) update or delete on table "Users" violates foreign key constraint "UserToken_UsersID" on table "UserToken". Key (UsersID)=(ID) is still referenced from table "UserToken"

Cause

It is not possible to delete the user, as BA keeps the history of all billing-related actions performed by all users and does not allow it to be removed. This ensures that all actions can be audited and checked.

1) the user accepted the Terms and Conditions assigned to the service plan that the customer's subscriptions are based on;

2) the user created some financial documents;

3) the user is listed as a domain owner;

4) token generated was not deleted; the issue is confirmed as a bug with id #PBA-74988 ("Not possible to delete user if Token was generated for it").

Resolution

The ability to delete staff members and users has been requested as a feature, its id is #PBA-17321 ("Ability to delete Staff Members ").

For the cases 1,2,4 - disable the staff member (Disable User button) instead of removing it.

For the case 3 reassign the domain owner: Home > Services > Domains > Domain #ID name Manage Contacts button in the Contact Info part of the page.

Search Words

user removal

remove user

delete staff member

Delete Admin Account

remove admin user parallels

delete admin user

removing user

deleting domain admin accounts

update or delete on table "Users" violates foreign key constraint "AcceptedTerms_UsersID" on table "AcceptedTerms"

changing existing staff member username

removal of staff member

unable to delete user

delete user

delete disabled user

delete user in CP

user deletion

update or delete on table "Users" violates foreign key constraint "ARDoc_Crtd_User_UsersID" on table "ARDoc"

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae

Email subscription for changes to this article
Save as PDF