Bulk Creation of users in DotNetNuke

TechNovation
TechNovation used Ask the Experts™
on
Hello,

I found the following code in internet on how to delete many users at once from DotNetNuke portal using SQL statement to change directly in SQL database used by DNN.
I would like to do the same for CREATION of users in dotnetnuke using SQL, I have many users each period to create, what SQL code would work?
SELECT UserID FROM Users WHERE UserID > 470
 
DELETE 
FROM dbo.aspnet_Membership 
WHERE UserId IN
(
SELECT  u.UserId
FROM    dbo.aspnet_Users u
INNER     JOIN dbo.aspnet_Applications a ON u.ApplicationId = a.ApplicationId
INNER     JOIN Users U1 On U1.UserName = u.LoweredUserName
WHERE   LOWER(0) = a.LoweredApplicationName
AND U1.UserID > 470
)
 
--- Repeat for tables aspnet_UsersInRoles, aspnetaspnet_Profile, aspnet_Users
 
--- and finally
DELETE FROM dbo.Users WHERE UserID > 470

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You'll struggle imported via SQL as you'll need to encrypt passwords and also do lots of string handling for the membership fields. You would be better of either coding a custom bulk user module in DNN or using an existing one like this one http://marketplace.dotnetnuke.com/p-88-bulk-user-manager278.aspx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial