locked
Check name feature RRS feed

  • Question

  • User2088942292 posted

    Hello,

    I am working on a Intranet/knowledge base system, everything is working fine but I have setup some mail template the helpdesk send to users from the site, at this moment we need to put in the user full e-mail in order to send the form. I put a txtbox and button and I would like to know how to do a check name when you put the user name or username in the txtbox so it automatically generate the e-mail.

    Just something to start with would also be appreciated

    Forgot to mention my code is in VB.net not C

    Cheers,

    Pierre

    Monday, August 20, 2012 6:41 AM

Answers

  • User636753033 posted

    Thx for the response another quick question , the domain has over 50 department, users are seperated in the OU's depending on the department they are in. Could I just have it search all the domain? like LDAP://gnb.ca/CN=Full Name,DF=gnb,DC=ca ?

    Cheers,

    In the directoryentry just use the root of the domain. Do not list any sub OUs. And it will search the entire domain.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 22, 2012 8:36 AM

All replies

  • User-837620913 posted

    Try this:

    Dim userEntry As New DirectoryEntry("LDAP://domainname.com/CN=Full Name,OU=Accounts,DC=domainname,DC=com")
    
    If userEntry IsNot Nothing Then
    	txtUserID.Text = userEntry.Properties("displayName").Value.ToString()
    	txtFullName.Text = userEntry.Properties("givenName").Value.ToString() + " " + userEntry.Properties("sn").Value.ToString()
    
    	If userEntry.Properties("mail").Value.ToString() IsNot Nothing Then
    		txtMail.Text = userEntry.Properties("mail").Value.ToString()
    	End If
    End If



    Monday, August 20, 2012 8:52 AM
  • User2088942292 posted

    Thx for the response another quick question , the domain has over 50 department, users are seperated in the OU's depending on the department they are in. Could I just have it search all the domain? like LDAP://gnb.ca/CN=Full Name,DF=gnb,DC=ca ?

    Cheers,

    Monday, August 20, 2012 12:09 PM
  • User636753033 posted

    Thx for the response another quick question , the domain has over 50 department, users are seperated in the OU's depending on the department they are in. Could I just have it search all the domain? like LDAP://gnb.ca/CN=Full Name,DF=gnb,DC=ca ?

    Cheers,

    In the directoryentry just use the root of the domain. Do not list any sub OUs. And it will search the entire domain.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 22, 2012 8:36 AM