/// <summary> /// Initializes an instance of this object. /// </summary> public InternalUser() { store = Store.GetStore(); if (store.DefaultDomain == null) { throw new SimiasException(InternalUser.missingDomainMessage); } domain = store.GetDomain(store.DefaultDomain); if (domain == null) { throw new SimiasException(InternalUser.missingDomainMessage); } if (domain.IsType("Enterprise") == false) { throw new SimiasException(InternalUser.missingDomainMessage); } utf8Encoding = new UTF8Encoding(); md5Service = new MD5CryptoServiceProvider(); // Make sure the password is set on the admin SetAdminPassword(); }
/// <summary> /// Initializes an instance of this object. /// </summary> public User() { store = Store.GetStore(); if (store.DefaultDomain == null) { throw new SimiasException(User.missingDomainMessage); } // Is the default domain always the correct domain? domain = store.GetDomain(store.DefaultDomain); if (domain == null) { throw new SimiasException(User.missingDomainMessage); } if (domain.IsType("Enterprise") == false) { throw new SimiasException(User.missingDomainMessage); } ldapSettings = LdapSettings.Get(Store.StorePath); // Make sure the password is set on the admin SetAdminPassword(); }