Unlock shared content blocks in Sitefinity API

74 views Asked by At

I want to unlock shared content blocks using Sitefinity API, but it does not appear that the ContentItems returned by ContentManager's GetContent() method has any attribute related to locking like the PageManager has (LockedBy). Yet, the Sitefinity UI clearly shows content blocks that are locked by users. Is there a method I'm missing somewhere?

1

There are 1 answers

1
Veselin Vasilev On BEST ANSWER

You can check if there is a Temp version for your content item and if so, then it means it is locked. You can get the locked By userId from the LastModifiedBy property of the Temp version.