Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Indoo
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Adding Custom User Info to my Portal from External Source
Previous Previous
 
Next Next
New Post 5/13/2008 8:58 AM
User is offline Dan
5 posts
10th Ranked


Adding Custom User Info to my Portal from External Source 

I would like to add a "Global Variable" to my web portal and was wondering if someone could provide me advice as far as where in the code to do this.

What I'll be doing is taking the logged in user's UserId and querying an external database to see if I find them.  If I do, I want to store additional information that's stored in my external data source but not in DNN.

Can someone please tell me where it makes the most sense to do this?  I'm an experieced .NET and J2EE developer, but DNN is new to me.

 
New Post 5/23/2008 6:48 AM
User is offline Dan
5 posts
10th Ranked


Re: Adding Custom User Info to my Portal from External Source 

Hello?  Is there anyone out there?  I can't believe no one knows how to do this.

 

I've written the code needed to query the external database based on Active Directory Name and pull in the info I want to store globally.  The only thing I need is insight of where to put this code so that it will be in memory as soon as my AD user authenticates through the site.  Can someone please help?

 
New Post 5/30/2008 11:41 AM
User is offline Golden Snitch
32 posts
10th Ranked


Re: Adding Custom User Info to my Portal from External Source 

When doing stuff with DNN I try very hard not to change any DNN code as it makes upgrading a nightmare.  So with that in mind, and the fact that this is "user" information, I would suggest creating User Profile controls that looks up/stores the information.  DNN allows developers to create their own custom "data types" for user profiles.  If you are not familiar with user profile properties, you can edit the list of proeprties availalble for each user from the Admin -> User Accounts page in "Manage Profile Properties".  The value of each property is set  by editing a user and clicking the "Manage Profile" link.

Anyway, you can create your own controls that will show up in the "Data Type" drop down on the Edit Profile Property Definition page.  Your control would be a "read-only" control that could pull the external info whenever the user's profile is edited.  You could then retrieve the extended information using the the user's UserInfo object whenever you need it.  This would give you the advantage of being able to see the information everywhere the profile properties are shown.

Another approach would be to use a custom skin object.  I havn't done much with skin objects but basicly you create a class that defines a tag that you put in your skin.  When the skin loads it runs you code.  Usually this provides some UI but I don't see a reason why it has to.

These solutions may not work for you depending on where you want to use the information.  If you can give me some more information on that I may be able to give you some more suggestions.

If you are willing to change DNN core code that anywhere where you would put it in your own ASP.NET application would be appropriate.

Whatever approach you take you might want to use the DNN provided caching functionality in the DotNetNuke.Common.Utilities.DataCache class.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Adding Custom User Info to my Portal from External Source
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com
Expressnet - DotNetNuke Hosting
Expressnet provide premium quality ASP.NET Web Hosting. We specialise in Windows based products including ASP.NET and Microsoft SQL Server. We offer fantastic value packages for DotNetNuke hosting. We also offer free asp.net web hosting
www.expressnet.com.au
Softech Development, Inc.
We help your business work smarter with DotNetNuke. Whether you need a new implementation, a custom module or skin for an existing implementation, or integration with your business processes, Softech has the experience and expertise to make it happen.
www.softechdevelopment.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP