/// <summary> /// Update a user in the AD. /// </summary> /// <param name="ldapConnectionInfo">The LDAP connection information</param> /// <param name="adUser">The user record to be updated</param> /// <returns>LdapResult class, which carries a copy of the updated user record.</returns> public static OutputUser AD_UpdateUser([PropertyTab] LdapConnectionInfo ldapConnectionInfo, [PropertyTab] UpdateADuser adUser) { var ldapOperationResult = new OutputUser { operationSuccessful = false, user = null }; using (var ldap = new LdapService(ldapConnectionInfo)) { ldapOperationResult.user = ldap.UpdateAdUser(adUser); ldapOperationResult.operationSuccessful = true; return(ldapOperationResult); } }