Documentation > CMS Template API Library > Asset > CheckoutUserId

CheckoutUserId

The user id of the user who has the asset checked out. Use User.Load to get the User object for this id.

Type

System.Int32

Value

The id of the user who has the asset checked out.

Code Example

C#

Sample:
	Asset myAsset = Asset.Load("/PathTo/Asset");
	if(myAsset.IsLoaded)
	{
		User usr = User.Load(myAsset.CheckoutUserId);
		if(usr != null)
		{
			Out.WriteLine(usr.Username);
		}
		else
		{
			Out.WriteLine("Asset isn't checked out.");
		}
		
	}

Connect with Crownpeak