Tried to remove an Analyst who has left the organisation and received an error

Version 4

    Verified Product Versions

    LANDESK Service Desk 7.7.xLANDESK Service Desk 7.8.xLANDESK Service Desk 2016.xLANDESK Asset Central 2016.xLANDESK Service Desk 2017.x

    Problem:

    When trying to delete a user from within Administration, the following error is displayed:

    "Attempt  to delete a data object of Class Type Password that has  already been  deleted. A data object that has been deleted cannot be  modified".

     

    Solution

    This happens when the analyst password has been marked as deleted in the database and the analyst record is not marked as being deleted. In order to resolve this the password needs to be undeleted before the user can be deleted.

     

    There are 2 approaches to this:

    1. Undelete the individual users password, then delete the user record

    OR

    2. Run a SQL statement to set all users passwords to be undeleted if that user is not deleted

     

    Undeleting the individual users password, then deleting the user record:

    Run the SQL statement below

     

    UPDATE tps_password SET tps_deleted = '0' WHERE tps_guid IN (SELECT tps_password_id from tps_user where tps_name = 'Fred')

     

    Where 'Fred' is replaced by the name value of your user.

     

    Now you should be able to manually delete this user successfully.

     

    Run a SQL statement to set all users passwords to be undeleted if that user is not deleted

    Alternately, running the following SQL will make sure that all passwords are set to 'not deleted' where the user record is not marked as deleted.

     

    UPDATE tps_password SET tps_deleted=0 WHERE tps_guid IN (SELECT tps_password_id FROM tps_user WHERE tps_deleted = 0)

     

    Now you should be able to manually delete this user successfully.

     

    Environment

    Servicedesk - all versions