Valid for Sitecore 5.X
6.  Creating A Virtual user

It is possible to create user objects in memory that do not physically exist in the security database. The user objects can be assigned administrative rights, roles etc. and can be used for login.  

Once a virtual user has been logged in, it is used by the system as if it was a 'real' user. Thus, API code that has special security needs can use virtual users to accomplish these.

An example of creating a virtual user:

ID myUserID = ID.NewID;
string myUserName = "Virt";

UserItem myUser
= Context.Domain.BuildVirtualUser(myUserID, myUserName);

using(new EditContext(myUser.InnerItem))
{
myUser.IsAdministrator
= true;
}

Context.Domain.Login(myUser);

Item item
= GetSomeProtectedItem(...);