User Impersonation

Is it possible to impersonate a user on Sitecore 8 or 9 for troubleshooting purpose? Is it core feature of Sitecore?

  • It is possible in code, but it isn't really a core feature.

    I've built my own login screen and I've got impersonation working, but behind the scenes I'm using:

    string domainUser = "extranet\\" + userID;
    if (!Sitecore.Security.Accounts.User.Exists(domainUser))
        System.Web.Security.Membership.CreateUser(domainUser, password, email);
    AuthenticationManager.Login(domainUser, false, true);