-
Notifications
You must be signed in to change notification settings - Fork 36
Switching the Context User
sergeyshushlyapin edited this page Nov 4, 2014
·
1 revision
You can switch the context user.
[Fact]
public void HowToSwitchContextUser()
{
using (new Sitecore.Security.Accounts.UserSwitcher(@"extranet\John", true))
{
Xunit.Assert.Equal(@"extranet\John", Sitecore.Context.User.Name);
}
}