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 ...Creating DNN Users via SQL Stored Procedure CodeCreating DNN Users via SQL Stored Procedure Code
Previous
 
Next
New Post
5/5/2008 7:02 PM
 

Hello...

I have a large SQL Database system that we want to use DNN as a front-end tool to gain access to the data.  I would like to programmatically create users in the DNN system as users are added to our database system using SQL that populates table/rows of aspnet security tables and using the DNN stored procedures.

So far my SQL Stored procedure creates the following entries in the Users, UserRoles, and UserProfile tables.

Then I execute the aspnet_Users_CreateUser, aspnet_Membership_CreateUser stored procedures to create the membership records to the DNN application with a default password of 'password123'.  On the Users table I have set the UpdatePassword column set to a '1' so that the user when the enter into the DNN system the 1st time they are required to enter a new password.

The user is able to log into the DNN site with their username and default password without issues.  My problem is that when they have made it to the 'change' password web page and then click the 'change password' link to change their password an error is thrown saying that 'A critical error has occured. Value cannot be null. Parameter name: username'

I am assuming that I have an incomplete record that is missing in the value for username...but I am unable to locate it.

What is the proper method of creating user accounts in DNN or am I missing a step here.

Thank you for your assistance.

...cordell...

 
New Post
5/5/2008 7:08 PM
 

You can use IWeb to create users via web services or at the very least look through the IWeb code and use it to create users. This code uses the DotNetNuke API to create users properly.

The problem with going directly to the database is it changes constantly. A upgrade to DotNetNuke will break your code.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
8/13/2008 3:33 AM
 

Hi,

you can use builtin funciton CREATEUser from usercontroller class, which is residing in Dotnetnuke libarary.

I had same problem, my users are from other SQL Database, i just wrote 5 lines function which transfer the users to my DNN database.

Using this you dont have to worry about the stored procedures and database structures etc.

GOOD LUCK

Aamir

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Creating DNN Users via SQL Stored Procedure CodeCreating DNN Users via SQL Stored Procedure Code


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