SPFile.LockedByUser property

Gets the user who has locked the file.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPUser LockedByUser { get; }

Property value

Type: Microsoft.SharePoint.SPUser
The user who owns the lock on the file. If the file is not locked, the value is a null reference (Nothing in Visual Basic).
Show: