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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Adding Custom User Info to my Portal from External SourceAdding Custom User Info to my Portal from External Source
Previous
 
Next
New Post
5/13/2008 11:58 AM
 

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 9:48 AM
 

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 2:41 PM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Adding Custom User Info to my Portal from External SourceAdding Custom User Info to my Portal from External Source


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