Take the community feedback survey now.
                AI OnAI Off
            
        Take the community feedback survey now.
 
                
        UserSid sid = UserSid.Load(txtEmail.Text);
        //CREATE USER
        if( sid == null )
        {
          sid = new UserSid(EPiServer.Security.SecurityIdentityType.ExtranetUser);
          sid.Name = txtEmail.Text;
          PasswordGenerator pwdGen = new PasswordGenerator();
                    
          strPassword = pwdGen.Generate();
          sid.Password = strPassword;         
          sid.Active = true;
 
          sid.Save();
                        