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%'
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityi 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();
}