Documentation > CMS Template API Library > Asset > CreateUserId

CreateUserId

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

Type

System.Int32

Value

The id of the user who created this asset

Code Example

C#

Sample:
	Asset myAsset = Asset.Load("/PathTo/Asset");
	if(myAsset.IsLoaded)
	{
		User usr = User.Load(myAsset.CreateUserId);
		if(usr != null)
		{
			Out.WriteLine("Asset created by: " + usr.Username);
		}		
	}	

Connect with Crownpeak