LUN-982: fixed Integrity error thrown when trying to delete users