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.0Custom Registration - Profile PropertiesCustom Registration - Profile Properties
Previous
 
Next
New Post
9/10/2007 9:36 PM
 

Hi,

How do I edit the profile properties to specify that different user roles require different profile properties?

For example:

  1. CUSTOMERS - will not require a CompanyName, etc...
  2. SUPPLIERS - will require a CompanyName, CompanyAddress, CompanyTel, CompanyURL, etc...

Thanks!

 
New Post
9/12/2007 12:08 AM
 

This is not currently possible with the DNN default registration system.
You would need to create your own custom rego system to do this sort of thing.

Though it certainly is possible with some coding skills.

Westa

 
New Post
9/14/2007 11:30 PM
 

Hi Westa,

Thanks for the note.

How do I remove the original registration "module" and create my own? As far as I know, user registration is a DEFAULT function in DNN, and is not a module.

Please advise. I'm new to DNN, so it's quite a steep learning curve.

Thanks!

 

 
New Post
9/15/2007 10:11 AM
 

Thanks for the note.

Can you please advise how to:

  1. Remove the original default "Register" module; and
  2. Install a new "Register" module?

Thanks!

 
New Post
9/15/2007 8:02 PM
 

In the ADMIN settings -  ADVANCED settings

THE User Page points to a page where you would place your own custom rego / user profile admina module.

When you select a page here - it turns off the default USER MODULE - and uses the one you create.

>>>

As for how to go about writing your own ... umm thats a bit of a more complex ask.

it can be a simple form  - with the fields you require - and a submit button that uses
code similar to this:

>>>

            Dim myUserCtl As New UserController
            Dim myUser As New UserInfo

            myUser.PortalID = PortalId

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

            ''Set AffiliateId
            Dim AffiliateId As Integer = Null.NullInteger

            If Not Request.Cookies("AffiliateId") Is Nothing Then
                AffiliateId = Integer.Parse(Request.Cookies("AffiliateId").Value)
            End If
            myUser.AffiliateID = AffiliateId

            myUser.FirstName = txtFirstName.Text
            myUser.LastName = txtLastName.Text

            'Update DisplayName to conform to Format
            Dim setting As Object = DotNetNuke.Entities.Modules.UserModuleBase.GetSetting(UserPortalID, "Security_DisplayNameFormat")
            If (Not setting Is Nothing) AndAlso (Not String.IsNullOrEmpty(Convert.ToString(setting))) Then
                myUser.UpdateDisplayName(Convert.ToString(setting))
            End If

            myUser.Email = txtEmail.Text
            myUser.Username = txtUsername.Text
            myUser.Membership.Password = txtPassword.Text

            myUser.Profile.Country = cboCountry.SelectedItem.Text
            myUser.Profile.PostalCode = txtPostal.Text

            'Set the Approved status based on the Portal Settings
            If PortalSettings.UserRegistration = PortalRegistrationType.PublicRegistration Then
                myUser.Membership.Approved = True
            Else
                myUser.Membership.Approved = False
            End If

            Dim createStatus As UserCreateStatus = UserController.CreateUser(myUser)

Westa

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Registration - Profile PropertiesCustom Registration - 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