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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Importing UsersImporting Users
Previous
 
Next
New Post
6/30/2006 10:33 AM
 
Previous to DotNetNuke 4.3 I could import users into DotNetNuke by creating a new UserInfo class and populating the values and then use the UserController to add the user.

I have been trying to do the same thing now with DotNetNuke 4.3. However, it never works for me. UserController.CreateUser returns a UserCreateStatus which is always "UnexpectedError {14}".

Does anyone know why this would be? I have compared the UserInfo object with one used in the registration and nothing is different between the two.

Michael
 
New Post
12/27/2006 8:47 AM
 

Have you solve this problem?

I am having the save return value calling UserController.CreateUser.

Thanks

 
New Post
12/27/2006 12:34 PM
 

 

You might try comparing it to the import script here which only works on 4.3 and above:

Importing Users to DotNetNuke


DotNetNuke Modules from Snapsis.com
 
New Post
1/2/2007 10:38 AM
 

John - I am doing the almost same thing of importing users - I can very successfully create the user but how can i get the id of the created user back?  I tried just logging them in but that doesnt seem to handle it - at least UserID is -1 all the time

 


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
1/2/2007 4:20 PM
 

Never mind on my previous comment I figured that out from the createstatus

However all my created users dont seem to have the default profile of any kind set and this messes with the admin users page - I keep getting a databond error -

If I take out my progmatic users and only use ones created through the register tag its alright but if I create a user in code its messed up - any clues ?  Heres my code to create a user

If Page.IsValid Then
                Dim myUserInfo As Users.UserInfo = New Users.UserInfo
                With myUserInfo
                    'Set membership ASP.NET MEBERSHIP STUFF so we can double check things
                    .Membership.Password = Me.tbPassword.Text
                    .Membership.Username = Me.tbUserName.Text
                    .Membership.Email = Me.tbEmailAddress.Text
                    'For DNNs users table
                    .PortalID = PortalId
                    .FirstName = Me.tbFirstName.Text
                    .LastName = Me.tbLastName.Text
                    .Email = Me.tbEmailAddress.Text
                    .Username = Me.tbUserName.Text
                    .DisplayName = Me.tbFirstName.Text.Trim & " " & Me.tbLastName.Text.Trim
                End With
                Dim CreateStatus As UserCreateStatus = Users.UserController.CreateUser(myUserInfo)
                'Here we check the user status of the user we created or tried to create
                'if there is a problem we pull up a message and keep the page up so they
                'can change it - possibility of marking the field wrong exists maybe
                Select Case CreateStatus
                    Case UserCreateStatus.Success ' no problems - continue
                        Me.pnlStart.Visible = False
                        Me.pnlCompany.Visible = True
                        Me.tbUserID.Text = myUserInfo.UserID
                    Case UserCreateStatus.DuplicateEmail
                        'error code
                    Case UserCreateStatus.DuplicateUserName
                        'error code
                    Case UserCreateStatus.InvalidEmail
                        'error code
                    Case UserCreateStatus.InvalidPassword
                        'error code
                    Case UserCreateStatus.InvalidUserName
                        'error code
                    Case UserCreateStatus.UnexpectedError
                        'error code
                    Case UserCreateStatus.UserAlreadyRegistered
                        'error code
                    Case UserCreateStatus.UsernameAlreadyExists
                        'error code
                    Case UserCreateStatus.UserRejected
                        'error code
                    Case Else
                        'Error code
                End Select
            End If


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Importing UsersImporting Users


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