public static LDAPUser GetUser(LDAPUserParam param)
        {
            LDAPUser       user           = new LDAPUser();
            DirectoryEntry directoryEntry = new DirectoryEntry(param.Path, param.DomainLoginName, param.Password, AuthenticationTypes.Secure);

            try
            {
                DirectorySearcher directorySearcher = new DirectorySearcher(directoryEntry);
                directorySearcher.Filter = param.UserNameFilter;

                SearchResult       searchResult       = directorySearcher.FindOne();
                DirectoryEntry     userDirectoryEntry = searchResult.GetDirectoryEntry();
                PropertyCollection propertyCollection = userDirectoryEntry.Properties;
                SetUser(param, propertyCollection, ref user);
            }
            catch (Exception exception)
            {
                user.SetErrorMessage(exception.Message);
            }

            return(user);
        }