Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...multi portal sharing usersmulti portal sharing users
Previous
 
Next
New Post
6/13/2007 11:52 PM
 

penra wrote

What syntax would you use? Can you show a specific example of adding a user (can you add groups?) to another portal?

thank you mcsenow!

The solution is database trigger in the event of insert or update to DNN User table.  When you add a new user or update an existing user, the trigger will automatically run to setup the user as share user to all portals (parent and childs). 

Example 1 - if you have a parent portal and 5 child portals.  You add a new user "penra" to the parent (or any child) portal, the same account (penra, pw) can be used to login other portals (ex. the 5 child portals).  

Example 2 - if you have an existing user "penra2" in the parent (or amy child) portal and you use the Admin -> User Manager to update the account, the trigger will set up penra2 account to share among all portals.

Keep in mind that the existing accounts that were setup in DNN before the trigger was added will not be setup as share accounts among the portals UNLESS the accounts are updated (by admin via User Manager screen or by individual via profile screen).  This is because the trigger will not run unless there is insert or update event to table DNN user.

Hope this helps.


Fuji Nguyen
FREE Visitor Hit Counter
Visit opensource.indyneinc.com for detail.
 
New Post
1/13/2008 5:50 PM
 

Fuji Nguyen,

Your SQL solution is superb... I have one issue with it that I hope someone can help me with.

This creates the same user against every portal in the installation, but it does not add any security roles to the user for portals other than the one they registered on. Thus if you have a page that is only visible to registered users they will not be able to see it unless you admin their account and add the user to the registered user role.

What I would like is to add the user to all the portalID's which it already does and then add all the roles that are set to auto-assign when they add to a portal (default being "registered users" & "subscribers"... That way if they come back and unsubscribe, even if they update their account... it will not subscrive them again because it will be using the same logic that says "This user already exixts for this portal therefore do not add them".

I'm hoping someone is feeling charitable... because sadly my SQL abilities rank up there with my cooking skills... Please help!

Kind regards

Pete


Aarrgghhh! User Error DNN Version: 4.4/4.5
Websites: taxinumber.com/taxi-today.com
Like DNN? Yes! Very much, congratulations!
Poor eyesight? Yes! Thankyou very much!
 
New Post
1/19/2008 4:57 PM
 

Anyone feeling charitable?


Aarrgghhh! User Error DNN Version: 4.4/4.5
Websites: taxinumber.com/taxi-today.com
Like DNN? Yes! Very much, congratulations!
Poor eyesight? Yes! Thankyou very much!
 
New Post
3/18/2008 3:11 PM
 

Pete,

Follow the example trigger I posted and see if you can come up with the ones you need.  Give it a try and if you need help, post in this forum.

Background:  DNN security roles Administrators, Registered Users, Subscribers exist in each portal.  Table 2 has example of these built-in roles for portalid 0 and portalid 2.  The objective is to create records in table UserRoles (Table 3) for each combination of RoleID (Table 2) and UserID (Table 1).   I think you will need to add triggers to table Users and Roles.

Table 1 - Sample data from table Users

UserID Username FirstName LastName
1 host SuperUser Account
2 admin Admin Istrator
3 test test test
4 ACKE02 ALLEN ACKERMANN
5 ADAM10 BRANDT ADAMS
6 ADAM08 PHILLIP ADAMS
7 NGUY01 D. FUJI NGUYEN
8 testtest testteste est
9 alan0 Alan Brewer

Table 2 -  Sample data from the Roles table

RoleID PortalID RoleName Description
0 0 Administrators Portal Administration
1 0 Registered Users Registered Users
2 0 Subscribers A public role for portal subscriptions
3 0 TimeXP TimeXP
7 2 Administrators Portal Administration
8 2 Registered Users Registered Users
9 2 Subscribers A public role for portal subscriptions

Table 3 - Sample data from the UserRoles table

UserRoleID UserID RoleID
1 2 1
2 2 2
3 2 0
5 3 1
6 3 2
7 3 3
8 4 1
9 4 2
10 5 1
11 5 2
12 6 1
13 6 2
17 2 8
18 2 9
19 2 7
20 7 1
21 7 2
22 8 1
23 8 2
24 9 1

 

Fuji.


Fuji Nguyen
FREE Visitor Hit Counter
Visit opensource.indyneinc.com for detail.
 
New Post
4/9/2008 6:55 PM
 

Thank you fuji.. this is very helpful.

Along the same lines...

I've been trying to add a user and the user's role to one portal when it is created in another. The portals would be separate instances of DNN, not Parent/Child.  Is that possible? 

Thank you for your help. 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...multi portal sharing usersmulti portal sharing users


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. 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.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out