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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Add Profile PropertiesAdd Profile Properties
Previous
 
Next
New Post
4/20/2007 2:49 AM
 

Hi

I have a snippet of code that whose purpose is to a) create a user and b)whilst doing so, setting some profile properties. The user is being created correctly, however the two profile properties ("ReceiveEmails" and "SiteVisitCount") are not being saved to the UserProfile table as I would expect.  THe Profile definitions are entered into the ProfilePropertyDefinition table, so I'm a little confused as to why the profile is not correctly uodated.  Any advice or direction would be greatly received.

With

objUserInfo

.PortalID = PortalId
.FirstName = firstName
.DisplayName = firstName
.Profile.InitialiseProfile(PortalId)
.Profile.FirstName = firstName
.LastName = lastName
.Profile.LastName = lastName
.Profile.PreferredLocale = preferredLocale
.Email = email
.Username = username

If (receiveEmails = True) Then
.Profile.SetProfileProperty("ReceiveEmails", "1")
Else
.Profile.SetProfileProperty("ReceiveEmails", "0")
End If
.Profile.SetProfileProperty("SiteVisitCount", "0")
.Membership.Password = password
.Membership.Approved = True
End With

userCreateStatus = UserController.CreateUser(objUserInfo)

result = a newly created user without the ReceiveEmails or SiteVisitCount paramters set.

Regards

Stuart McKenzie

 
New Post
4/22/2007 12:26 PM
 

Any ideas on this one?

 
New Post
4/22/2007 3:30 PM
 

I'm having the same issue.

Check your DNN Profiles table and see if the entires are there.  They probably are.

Then register someone through the dnn registration interface using the SAME profile properties.

Check the table again and see if the proifiledefinitionid 's are different.

I've noticed the ids are different when registered through the DNN form,

hence the others do not appear.

Does anyone know what causes this?

What changed between DNN 4.4.1 and 4.5.x to alter the way definition IDs are handled?

 
New Post
4/22/2007 7:29 PM
 

In your code - is the user profile being instantiated correctly.

            Dim newUser As New UserInfo
            newUser.PortalID = PortalId

            ''Initialise the ProfileProperties Collection
            newUser.Profile.InitialiseProfile(PortalId)
            newUser.Profile.PreferredLocale = Me.PortalSettings.DefaultLanguage
            newUser.Profile.TimeZone = Me.PortalSettings.TimeZoneOffset

Westa

 
New Post
4/22/2007 7:48 PM
 

Hi Wezza

Thanks for the reply.
Apart from the timezone offset, everything else is there - is the TImeZone offset required? I have not set this in the past and things seem to work correctly?

Regards

Stuart

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Add Profile PropertiesAdd Profile Properties


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