locked
Paul Galvin testing RRS feed

  • Question

  • checking it out...

    here is some code:

     
            /// <summary>  
            /// Gets the security groups for a user object.  
            /// </summary>  
            /// <param name="user">The user.</param>  
            /// <param name="rootDSE">The root DSE.</param>  
            /// <returns></returns>  
            private List<string> GetSecurityGroups(DirectoryEntry user, DirectoryEntry rootDSE, string propertyName)  
            {  
                List<string> groups = new List<string>();  
                user.RefreshCache(new string[] { "tokenGroups" });  
                using (DirectorySearcher ds = new DirectorySearcher(rootDSE))  
                {  
                    ds.PropertiesToLoad.Add(propertyName);  
                    // Convert the list of binary SID values into readable group names  
                    foreach (byte[] bSid in user.Properties["tokengroups"])  
                    {  
                        // Convert binary SID to octet string usable for LDAP query  
                        string sidfilter = BuildFilterOctetString(bSid);  
     

    --Paul Galvin of www.Conchango.com @ http://feeds.feedburner.com/PaulGalvinsSharepointSpace
    Friday, July 11, 2008 11:51 AM

All replies

  • You have a bug on line 1,872,922.
    Friday, July 11, 2008 12:24 PM
  • Where's my delete button.

    Mike (Moderator but not here)
    • Proposed as answer by Ed.Richard Monday, July 14, 2008 1:41 AM
    Friday, July 11, 2008 5:09 PM
  • Just playing around.....

    Missing the Copy Code button ;-)
    Ed Richard
    Monday, July 14, 2008 1:48 AM
  • Ed.Richard said:

    Just playing around.....

    Missing the Copy Code button ;-)


    Ed Richard



    Quoting Ed in Paul's Thread
    Devin
    Tuesday, July 15, 2008 7:39 PM
  • Giving a try

    • Proposed as answer by David Frommer Saturday, July 19, 2008 7:18 PM
    Wednesday, July 16, 2008 7:56 AM
  • Worst code ever! ;)
    -Randy Drisgill | The Mossman | blog.drisgill.com
    Tuesday, July 22, 2008 3:59 PM
  • The Mossman said:

    Worst code ever! ;)


    -Randy Drisgill | The Mossman | blog.drisgill.com



    Did i say that?
    -Randy Drisgill | The Mossman | blog.drisgill.com
    Tuesday, July 22, 2008 4:11 PM