Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

ldap check user exists

public bool UserExists(string username)
{
   // create your domain context
   using (PrincipalContext domain = new PrincipalContext(ContextType.Domain))
   {
       // find the user
       UserPrincipal foundUser = UserPrincipal.FindByIdentity(domain, IdentityType.Name, username);

       return foundUser != null;
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: newtonsoft json conditionally ignore property 
Csharp :: C# int.parse input string wasnt in correct format 
Csharp :: monodevelop ubuntu 20.04 
Csharp :: c# + longest streak in strings 
Csharp :: c# datetime now timestamp 
Csharp :: c# keyboard enter 
Csharp :: list of all c# keywords 
Csharp :: c# convert string to enum value 
Csharp :: c sharp split string 
Csharp :: unique id c# 
Csharp :: C# datetime.now to string only numbers 
Csharp :: drag png to unity 3d 
Csharp :: unity making a coroutine wait until another coroutine is done 
Csharp :: unity 2d joystick controls 
Csharp :: blazor oninitializedasync 
Csharp :: c# run file 
Csharp :: c# inline a function 
Csharp :: c# writeline list 
Csharp :: read xml file c# 
Csharp :: c# loop through files in folder 
Csharp :: c# compile just one exe 
Csharp :: tostring tmpro unity 
Csharp :: unity chat system 
Csharp :: how to convert string to int in c# 
Csharp :: base64 decode how used in c# 
Csharp :: visual studio fix formatting 
Csharp :: how unsort the data table options 
Csharp :: make a list c# 
Csharp :: c# list subfolders 
Csharp :: c# read file 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =