You create a class file in your App_Code Directory. I call this one CustomFunctions.cs
You then call the function in your transformation as CustomFunctions.GetUserDescription("Put or get UserID Here")
Here is the complete class. Just create the file name above and paste this code into it. Or if you have a custom function class file already just past the code. Make sure your usings are correct.
/// Custom Functions for Site.
public class CustomFunctions
public static string GetUserDescription(object UserID)
string resolved = string.Empty;
if (UserID != null)
if (Int32.TryParse(UserID.ToString(), out userID))
var user = UserInfoProvider.GetUserInfo(userID);
if (user != null)
resolved = user.UserDescription ?? string.Empty;