Administrator Logins

Administrator Logins

Administrators

  • A special user account that provides full access to all content and functionality regardless of any defined access rights
  • When Sitecore is first installed, the admin login is an administrator account


C# Web Control Code


Sitecore.SecurityModel.DomainAccessResult result = Sitecore.Context.Domain.Login(Sitecore.Context.Domain.GetUser("admin"));

if (result.Success)

{

      //TODO

      if (item != null)

      // log out for security reasons

}

Sitecore.Context.Domain.Logout();


Sources