DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

User cannot login second portal

 9 Replies
 2 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!

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

 

 

 

Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!
I know you can use Site Groups.. but we need the create useraccounts in portal 2
Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

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.

Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!
In the past you could... is this a change in DNN (latest versions)?
Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

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.

 

Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!
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

 

 

Michael Tobisch
DNN★MVP

DNN Connect
Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!

so I only have to add the record to the userportal table?

Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

And you have to assign the "registered users" role for the portal, but you can do that from the Persona Bar too I think..

Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!
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.

Happy DNNing!
Michael

 

 

 

Michael Tobisch
DNN★MVP

DNN Connect
Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!
username and password should be exactly the same... that did the trick... thanks!!

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:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved