I needed to transfer some users from an old membership database to my DotNetNuke database so I made a quick import routine and thought I would share in case anyone has to do something simular.
What you need to do is get your users into an XML format like that shown below, and use the attached ImportUsers.aspx page from your DNN website.
<Users> <User> <Username>User1</Username> <Email>user1@yahoo.com</Email> <FirstName>User</FirstName> <LastName>One</LastName> <Password>password</Password> <Unit></Unit> <Street></Street> <City></City> <Region></Region> <PostalCode></PostalCode> <Country></Country> <Telephone></Telephone> </User> <User> <Username>User2</Username> <Email>user2@yahoo.com</Email> <FirstName>User</FirstName> <LastName>Two</LastName> <Password>password</Password> <Unit></Unit> <Street></Street> <City></City> <Region></Region> <PostalCode></PostalCode> <Country></Country> <Telephone></Telephone> </User></Users>
I quickly made an XML file like the one above from my User DB by running the Following SQL:
SELECT '<Username>' + UL.Username + '</Username>','<Email>' + S.Email + '</Email>','<FirstName>' + S.FirstName + '</FirstName>','<LastName>' + S.LastName + '</LastName>','<Password>' + UL.Password + '</Password>'FROM UserLogins UL Left Outer Join Subscribers S On UL.UserName = S.UserNamewhere S.Username is not null
Of course you will probably have different tables in your User DB, but you should get the idea.
As you can see from the SQL above, not all the nodes have to be in the XML for it to work.
Remember Me