Unable to delete users using web service

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2006 03:07 PM
I am trying to use the web service to create and delete users. I've noticed that if I try to recreate a user that has already been deleted (using the web service) I get a duplicate user exception. I also noticed that the following entry in the node_properties table is still available for users that I've deleted using the web service:
node_id actual_type string_value qname
614 STRING alfrescotestuser3@test.com {http://www.alfresco.org/model/user/1.0}username
After looking at the code for AdministrationWebService.createUsers() and AdministrationWebService.deleteUsers(), I found that AdministrationWebService.createUsers() contains a call to authenticationService.createAuthentication() and a call to personService.createPerson(). However, AdministrationWebService.deleteUsers() only calls personService.deletePerson() - it does not delete the authentication for that user. This, I believe, is the source of the duplicate user exception that is thrown if I try to create another user with the same username. I've also included an example below of how I am using the web service. Am I using it incorrectly? Is this a known problem with the web service?
I'm using alfresco v1.3
Any advice would be greatly appreciated!
my code:
node_id actual_type string_value qname
614 STRING alfrescotestuser3@test.com {http://www.alfresco.org/model/user/1.0}username
After looking at the code for AdministrationWebService.createUsers() and AdministrationWebService.deleteUsers(), I found that AdministrationWebService.createUsers() contains a call to authenticationService.createAuthentication() and a call to personService.createPerson(). However, AdministrationWebService.deleteUsers() only calls personService.deletePerson() - it does not delete the authentication for that user. This, I believe, is the source of the duplicate user exception that is thrown if I try to create another user with the same username. I've also included an example below of how I am using the web service. Am I using it incorrectly? Is this a known problem with the web service?
I'm using alfresco v1.3
Any advice would be greatly appreciated!
my code:
createAlfrescoUser() { … AuthenticationUtils.startSession(USER,PASSWORD); NewUserDetails[] newUsers = new NewUserDetails[] { new NewUserDetails( username, password, new NamedValue[] { new NamedValue(Constants.PROP_USER_EMAIL, false,email,null), new NamedValue(Constants.PROP_USER_FIRSTNAME, false,"bogus",null), new NamedValue(Constants.PROP_USER_LASTNAME, false,"bogus",null)} )}; WebServiceFactory.getAdministrationService().createUsers(newUsers); AuthenticationUtils.endSession(); …}deleteAlfrescoUser() { … AuthenticationUtils.startSession(USER,PASSWORD); WebServiceFactory.getAdministrationService().deleteUsers(new String[] {usernameToDelete}); AuthenticationUtils.endSession(); … }
Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2006 05:28 AM
I've responded in this article http://forums.alfresco.com/viewtopic.php?t=1600

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2006 02:58 PM
Thanks for the update rwetheral. In the meantime, do you know how I can remove these orphan authentication records? I have some users who were deleted using the web service and now need to be recreated (using their original usernames). Some of these users have also created content. Is there a way I can remove the authentication records from the database so that alfresco will not throw a duplicate user exception when I try to recreate the user?
Thanks in advance for your help!
Thanks in advance for your help!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2006 09:15 AM
If you login in alfresco with the user's login and password, you'll could find it in alfresco admin panel.
Sorry for my english :lol:
Sorry for my english :lol:
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2006 09:37 AM
Hi all.
Lorel, I think adamss would like to completely remove the user from the repository via web services and, more in general, programatically and not using the control panel for the administrator.
I have the same problem, it could be great if someone tell us the best way to remove the orphan authentication records.
Would it be enough to delete the orphan record from the alf_nodes database table? Are there any other references to the user inside different tables?
Many thanks to all.
All the best,
Sergio
Lorel, I think adamss would like to completely remove the user from the repository via web services and, more in general, programatically and not using the control panel for the administrator.
I have the same problem, it could be great if someone tell us the best way to remove the orphan authentication records.
Would it be enough to delete the orphan record from the alf_nodes database table? Are there any other references to the user inside different tables?
Many thanks to all.
All the best,
Sergio

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2007 11:13 AM
Hi
Duplicate users are handled in 2.0. (Duplicates will be split, deleted, or one picked …)
Regards
Andy
Duplicate users are handled in 2.0. (Duplicates will be split, deleted, or one picked …)
Regards
Andy
