We have a DNN instance with 2 portals (1, 2). Portal 1 has 500 users that login with e-mailadres (username). All the 500 users should also be available in portal 2. Unfortunlately they can't login to portal 2. I tried to add the users to portal 2 but this isn't possible because e-mailadres is the username and this should be unique.
I already did check the settings in config and it's false: requiresUniqueEmail="false" Why can't we add/create the same user in portal 2
A username has to be unique in DNN, so you cannot have two users with the same username even on two different portals. You can however use the same user on several portals. It's manual process in the DB if you don't want to use portal groups.
No change AFAIK on the DB side, the limitation that a username can only exist once has always been there I think. I do think that in some previous versions, if you entered the exact same user data (UN, email pw) in a second portal, the exisiting user was added to that second portal. I have not tried that in a while. It might be that the DNN9 persona bar does not accept that anymore. Doing this using SQL is way more efficient BTW, especially with 500 users.
Posted By Willem on 1/9/2023 2:50 PM In the past you could... is this a change in DNN (latest versions)?
You never could, at least not since DNN 3 (I never worked with earlier versions, so I can't say, but I don't think this was possible before). The username field has (and always had) a unique index.
There is one Users table, and a user is either a superuser (then on all portals) or assigned to a portal in the UserPortals table (containing the UserID and the PortalID as a unique combination).
Happy DNNing! Michael
so I only have to add the record to the userportal table?
And you have to assign the "registered users" role for the portal, but you can do that from the Persona Bar too I think..
Posted By Willem on 1/9/2023 4:51 PM so I only have to add the record to the userportal table?
Yes, and as Timo said, assign it to the "Registered Users" group.
Beware: There is one "Registered Users" group per portal, so if you add the user in the database (table UserRoles), make sure you take the RoleID with the correct PortalID.
And don't forget to clear the cache or restart the application after you've done changes directly in the database.
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
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.