Portal Engine
Version 2.x > Portal Engine > error when deleting user View modes: 
User avatar
Member
Member
marie - 1/31/2007 6:49:40 PM
   
error when deleting user
Hello,

I am working through using the workflow and creating users and permissions for one of our clients and I am trying to delete a user that is no longer going to be accessing the cmsdesk. When I click the 'delete user' icon I receive the error below and the user is NOT deleted.


CMS.DataProviderSQL.ExecuteQuery: Query: Proc_CMS_User_RemoveDependences: caused exception: Invalid object name 'dbo.CMS_Document'.
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.


Does anyone know why I am getting this error and what I can do to resolve this issue so I can delete old users?

Thanks.

User avatar
Guest
kentico_martind - 2/16/2007 2:47:31 PM
   
Re: error when deleting user
Hello,
I'm affraid it's bug in current version. In query Proc_CMS_User_RemoveDependences there is strictly specified DB owner of [CMS_Document] table to dbo by mistake, while you are probably using another one. Please go to Microsoft SQL Server Management Studio, in ObjectExplorer expand your site database node, then expand Programmability -> Stored Procedures sub-node. Find the Proc_CMS_User_RemoveDependences procedure, right-click on it and choose modify. In procedure query replace this part of code:

UPDATE [dbo].[CMS_Document] SET DocumentCreatedByUserID=NULL WHERE DocumentCreatedByUserID=@ID;
UPDATE [dbo].[CMS_Document] SET DocumentCheckedOutByUserID=NULL WHERE DocumentCheckedOutByUserID=@ID;
UPDATE [dbo].[CMS_Document] SET DocumentModifiedByUserID=NULL WHERE DocumentModifiedByUserID=@ID;

with this:

UPDATE [CMS_Document] SET DocumentCreatedByUserID=NULL WHERE DocumentCreatedByUserID=@ID;
UPDATE [CMS_Document] SET DocumentCheckedOutByUserID=NULL WHERE DocumentCheckedOutByUserID=@ID;
UPDATE [CMS_Document] SET DocumentModifiedByUserID=NULL WHERE

and execute query.

This will be fixed in 2.1b version.

Best Regards,

Martin Dobsicek