From 1e788eac8efabeb2fdb36a3a416dba74fa96fc07 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 7 Feb 2013 07:50:09 -0500 Subject: [PATCH] Fix Organizational Provider error on Build. --- .../OrganizationProvider.cs | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs index 9d3bc367..53689f1d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs @@ -754,49 +754,6 @@ namespace WebsitePanel.Providers.HostedSolution - public bool DoesSamAccountNameExist(string accountName) - { - return DoesSamAccountNameExistInternal(accountName); - } - - - private bool DoesSamAccountNameExistInternal(string accountName) - { - HostedSolutionLog.LogStart("DoesSamAccountNameExistInternal"); - HostedSolutionLog.DebugInfo("sAMAccountName : {0}", accountName); - bool bFound = false; - - try - { - - string path = GetRootOU(); - HostedSolutionLog.DebugInfo("Search path : {0}", path); - DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); - - DirectorySearcher searcher = new DirectorySearcher(entry); - searcher.PropertiesToLoad.Add("sAMAccountName"); - searcher.Filter = "(sAMAccountName=" + accountName + ")"; - searcher.SearchScope = SearchScope.Subtree; - - SearchResult resCollection = searcher.FindOne(); - if (resCollection != null) - { - if (resCollection.Properties["samaccountname"] != null) - bFound = true; - } - } - catch (Exception e) - { - HostedSolutionLog.DebugInfo("Failed : {0}", e.Message); - } - - HostedSolutionLog.DebugInfo("DoesSamAccountNameExistInternal Result: {0}", bFound); - HostedSolutionLog.LogEnd("DoesSamAccountNameExistInternal"); - - return bFound; - } - - #endregion #region Domains