Patricio Treviño

Patricio Treviño

Husband . Father . Developer

Get the list of all locked items for a specific user in Sitecore.

Syntax

fast://*[@__lock='%<username>%']
view raw syntax.text hosted with ❤ by GitHub

Option Description
username The username to be searched.

Note: The query is executed as a wildcard search, so the username doesn't have to be exact.

Example

var database = Sitecore.Context.Database;
var items = database.SelectItems(string.Format("fast://*[@__lock]='%{0}%'", username));
foreach (var item in items) {
// process each item
}
view raw example.cs hosted with ❤ by GitHub