Hi
There used to be an excellent module on the DNN Store that allowed you to bulk upload users, which was very useful when you did not want to give full admin rights to a user
This module is no longer available and the previous version does not work with V9 and above.
I've used SQL profiler to find find the Stored Procedures that run when a user is manually added, but there is obviously something going on behind the scenes e.g.
declare @p12 uniqueidentifier set @p12='EC9D3AD1-FB87-4B7A-AD03-CB37A1917C39' exec dbo.aspnet_Membership_CreateUser @ApplicationName=N'DotNetNuke',@UserName=N'TestOne',@Password=N'jCWRjKtHvfNjpp0hoFTvP7ctT38=',@PasswordSalt=N'7QUNgLy6Ttyqm3d++aSUeQ==',@Email=N'[email protected]',@PasswordQuestion=NULL,@PasswordAnswer=NULL,@IsApproved=1,@UniqueEmail=0,@PasswordFormat=1,@CurrentTimeUtc='2021-11-07 15:56:40',@UserId=@p12 output select @p12 exec sp_executesql N';Exec dbo.AddUser @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10',N'@0 int,@1 nvarchar(4000),@2 nvarchar(4000),@3 nvarchar(4000),@4 nvarchar(4000),@5 int,@6 nvarchar(4000),@7 nvarchar(4000),@8 int,@9 int,@10 int',@0=0,@1=N'TestOne',@2=N'Test',@3=N'One',@4=NULL,@5=0,@6=N'[email protected]',@7=N'Test One',@8=0,@9=1,@10=1 exec sp_executesql N';Exec dbo.UpdateUserProfileProperty @0, @1, @2, @3, @4, @5, @6',N'@0 nvarchar(4000),@1 int,@2 int,@3 nvarchar(4000),@4 int,@5 nvarchar(4000),@6 datetime',@0=NULL,@1=2,@2=23,@3=N'Test',@4=0,@5=N'',@6='2021-11-07 15:56:40.557'
Does anyone know where I can find the documentation to tell me about this.
If I can get this information I believe I will be able to allow a Role based site user to Add new Users
This could be via a form (I use DataSprings Dynamic Forms - many other good alternatives exist) or I could allow the upload of a CSV file.
Thanks in advance
Dave
I created a script for generating 999 Test Users in DNN a while ago - it is available here: MaiklT/GenerateDNNTestUsers: An SQL script to create 999 Test Users for DNN (github.com). This should give you the idea what's going on behind the scenes...
Happy DNNing! Michael
Michael TobischDNN★MVP
Yeah... Only administrators and superusers can add new users by default.
Otherwise, you have to use another third-party or custom extension to do that. I'd always suggest avoiding using a SQL script directly. Unless you're very familiar with what does and doesn't happen under the covers in DNN, you may be missing steps that the server-side API is doing in addition to the one thing you intended to happen.
In the meantime, Mandeeps has a User Management module that has this feature available.
Hi Michael
Just had a very quick look at your script. I believe what you have has given me sufficient information to generate a solution.
My thoughts are this
Create a Stored Procedure that Adds say 10 new users to my Portal. Trigger that through the standard Reports module. I can then use a Form type module (Datasprings Dynamic or Action Forms there are many excellent ones out there) to provide my Site "controller" to change the username and Display names to "add" their own users.
I'll share my solution with you when produced.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.