Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationPopulate user profile automatically from ADPopulate user profile automatically from AD
Previous
 
Next
New Post
7/27/2007 6:20 AM
 

Hi,

I have the AD module installed on my company intranet and it's an excellent module.  But is there a way of pre-populating the user profile with values from active directory??  For example, if you edit a profile the first and last names are pre-populated but is there a way of doing the same for the address and telephone numbers??

 
New Post
7/27/2007 10:45 AM
 

If the fields are populated in the AD user properties then it'll populate the fields (except for country/region) in DNN the first time a user logs in. I'll have to go through the code to verify if it'll happen everytime a user logs in but I don't think it currently does.

 
New Post
7/27/2007 10:58 AM
 

Do the field names in AD and dnn have to exactly match for them to be automatically populated then??  If so that might be the cause, or as you said they might not be populated in the first place!!  Have to check with the network guy in work...

 
New Post
7/27/2007 3:53 PM
 

It pulls from the object created in the Active Directy. Below is what's pulled from the AD User Object

With UserInfo
    .IsSuperUser = False
    .Username = UserInfo.Username
    .Membership.Approved = True
    .Membership.LastLoginDate = Date.Today()
    .Email = CheckNullString(UserEntry.Properties(ADSI_EMAIL).Value)
    .CName = CheckNullString(UserEntry.Properties(ADSI_CNAME).Value.ToString)
    .DisplayName = CheckNullString(UserEntry.Properties(ADSI_DISPLAYNAME).Value)
    If .DisplayName = "" Then
        .DisplayName = .CName
    End If
    .DistinguishedName = CheckNullString(UserEntry.Properties(ADSI_DISTINGUISHEDNAME).Value.ToString)
    .sAMAccountName = CheckNullString(UserEntry.Properties(ADSI_ACCOUNTNAME).Value.ToString)
    .Profile.FirstName = CheckNullString(UserEntry.Properties(ADSI_FIRSTNAME).Value)
    .Profile.LastName = CheckNullString(UserEntry.Properties(ADSI_LASTNAME).Value)
    .Profile.Street = CheckNullString(UserEntry.Properties(ADSI_STREET).Value)
    .Profile.City = CheckNullString(UserEntry.Properties(ADSI_CITY).Value)
    .Profile.Region = CheckNullString(UserEntry.Properties(ADSI_REGION).Value)
    .Profile.PostalCode = CheckNullString(UserEntry.Properties(ADSI_POSTALCODE).Value)
    .Profile.Country = CheckNullString(UserEntry.Properties(ADSI_COUNTRY).Value)
    .Profile.Telephone = CheckNullString(UserEntry.Properties(ADSI_TELEPHONE).Value)
    .Profile.Fax = CheckNullString(UserEntry.Properties(ADSI_FAX).Value)
    .Profile.Cell = CheckNullString(UserEntry.Properties(ADSI_CELL).Value)
    .Profile.Website = CheckNullString(UserEntry.Properties(ADSI_WEBSITE).Value)
    .AuthenticationExists = True
' obtain firstname from username if admin has not enter enough user info
    If .Profile.FirstName.Length = 0 Then
        .Profile.FirstName = TrimUserDomainName(UserInfo.Username)
    End If
End With

 
New Post
7/31/2007 6:47 AM
 

Cheers for that.  It turns out that some stuff weren't populated in AD so filled those details in, deleted the user in DNN and logged back in and it picked it up...

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationPopulate user profile automatically from ADPopulate user profile automatically from AD


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out