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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...UserRejected when creating new user programmaticallyUserRejected when creating new user programmatically
Previous
 
Next
New Post
6/17/2010 1:54 PM
 
No matter what value I use for a username, DotNetNuke returns "UserRejected" as an error when I try to set up an account programmatically. The same code worked fine 24 hours ago. Anyone have any tips? I'll paste the code I use below. I am using DotNetNuke 5.2.

                                'Basic Properties
                                Dim oUserInfo As New UserInfo
                                oUserInfo.PortalID = 0
                                oUserInfo.IsSuperUser = False
                                oUserInfo.Username = strArray(0) & strArray(1)
                                oUserInfo.FirstName = strArray(0)
                                oUserInfo.LastName = strArray(1)
                                oUserInfo.DisplayName = strUserName
                                oUserInfo.Email = strEmail

                                'Minimum User Profile Properties
                                oUserInfo.Profile.PreferredLocale = "en-US"
                                oUserInfo.Profile.TimeZone = -300
                                oUserInfo.Profile.FirstName = strArray(0)
                                oUserInfo.Profile.LastName = strArray(1)

                                'Set Membership
                                oUserInfo.Membership.Approved = True
                                oUserInfo.Membership.CreatedDate = System.DateTime.Now
                                oUserInfo.Membership.IsOnLine = False
                                oUserInfo.Membership.Password = strPass


                                'Add the user
                                Dim oStatus As MembershipCreateStatus = UserController.CreateUser(oUserInfo)
 
New Post
6/15/2011 11:20 PM
 
Hi,
Debug it and see the value of UserID, here are something you can refer to :

Possible errors during creating user:

'USERID = -1 - UNIDENTIFIED ERROR

'USERID = -2 - Duplicate UserName / UserKey / Already Exists / Already Registered

'USERID = -3 - USER REJECTED

'USERID = -4 - INVALID USERNAME

'USERID = -5 - UNEXPECTED / CAUGHT ERROR

'USERID = -6 - BAD/INVALID PASSWORD

'USERID = -7 - INVALID ANSWER/QUESTION


NovaSoftware ---a professional outsourcing company in China .
* More than 6 years' offshore experience in DNN
* Successfully developed 30+ websites , 250+ DNN modules, 50+ sets of Skins/Containers.
* Demo Site:http://dotnetnuke.novasoftware.com/
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...UserRejected when creating new user programmaticallyUserRejected when creating new user programmatically


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