1

How to unlock items that were locked by virtualssuser sitecore 8.1 ?

query like it can't find any records about user in code database

SELECT UserId FROM dbo.aspnet_Users WHERE UserName like '%virtualssuser%'

1 Answer 1

1

i have tried a poc on this before & we can achieve it using fast query to unlock items locked by a specific user if you have reasonable number of items to be unlocked.

Item[] items = database.SelectItems("fast:/sitecore/content//*[@__lock='%user=%']");
foreach (var item in items){
    item.Editing.BeginEdit();
    item.Locking.Unlock();
    item.Editing.EndEdit(); 
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.