Link to home
Start Free TrialLog in
Avatar of TechNovation
TechNovationFlag for Netherlands

asked on

Bulk Creation of users in DotNetNuke

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

ASKER CERTIFIED SOLUTION
Avatar of GuitarRich
GuitarRich
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial