You are here

You are here

Delete User

This example shows how to find a user and delete them from Address Book.

This example shows how to fully delete a user.  If you would rather disable their login without deleting them, use the Create User sample and just update the user's EnabledUTCEndDate to a date in the past

Vertical Tabs

SCMContactInfo[] users = springCMService.ContactFind(token, "", false);
    Console.WriteLine("User First Name: {0}", users[0].FirstName);
    Console.WriteLine("User Last Name: {0}", users[0].LastName);
    Console.WriteLine("Deleting user...{0}",users[0].Id);
    springCMService.Delete(token, SCMObjectType.User, users[0].Id);
SCMContactInfo[] users = springCMService.contactFind(token, "", false);
if (users.length == 1)
     System.out.println("User First Name: " + users[0].getFirstName());
     System.out.println("User Last Name: " + users[0].getLastName());
     System.out.println("Deleting user...." + users[0].getId());
     springCMService.delete(token, SCMObjectType.User, users[0].getId());
$userToDelete = '<email address of the user to delete>';
$userObject = $springCM->ContactFind( array(
$userObject = $userObject->ContactFindResult;
if (sizeof($userObject->SCMContactInfo) > 0);
	$springCM->Delete( array(
		'type'=>'User', // could also be 'Contact'