Documentation > CMS Template API Library > Asset > StatusUserId

StatusUserId

The user id of the user who last changed the asset's status. If the asset is not checked out, 0 is returned. Use User.Load to get the User object for this id.

Type

System.Int32

Value

The user id of the user who last changed the asset's status.

Code Example

C#

Sample:
	Asset myAsset = Asset.Load("/PathTo/Asset");	
	if(myAsset.IsLoaded)
	{
		User usr = User.Load(myAsset.StatusUserId);
		if(usr != null)
		{
			Out.WriteLine(usr.Username + " put asset in its current state.");
		} 
	}

Connect with Crownpeak