Search code examples
asp.netasp.net-membershipdotnetnuke

Dotnetnuke copy user with password from one portal to another


We are using DotNetNuke to create multiple websites(portals) 
 I am looking for a solution to Copy a user from one portal to another portal with same password.

I see that passwords are stored in aspnet_membership table in encrypted format.

How can I copy this user from One portal to another portal with the help of a sql script carrying the same password.


Solution

  • If you're trying to duplicate a user in the SAME instance of DNN, meaning, from PortalID 1 to PortalID 2, you can do this by simply adding a new record to the UserPortals table with the UserID and the NEW portalid you want to give them access to.

    This will add the user to the second portal. You can also add them to Roles in the UserRoles table if you want to assign them to specific roles.

    If you are trying to copy them from one instance of DNN to another, you're going to have a harder problem doing that, due to the encryption I believe.