sitecore Security Impersonate a different user when accessing an item


Example

var user = Sitecore.Security.Accounts.User.FromName("sitecore/testname", false); 

using (new Sitecore.Security.Accounts.UserSwitcher(user))
{
    var item = Sitecore.Context.Database.GetItem("/sitecore/content/home");
}