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 ...Inserting UserId into a table?Inserting UserId into a table?
Previous
 
Next
New Post
3/17/2008 12:25 PM
 

I'm afraid this may be a simple question but I'm new to coding and can't seem to get it straight.  Can anyone tell how to grab the UserId from the token and insert it into a table or datasource.

Thanks

 
New Post
3/17/2008 2:57 PM
 

dwillcutts,

Depending on how new you are and what you've established already in your module - this could be a very short or very long explanation :)

Have you established data access within your module? Are you writing anything else to the database yet?

There are two ways you can grab the UserId -- from the PortalModuleBase.UserID property and from the HttpContext.Current.UserID property.

You could then funnel this down through your data layer into the database.

If you could give us a more specific idea of what areas you need help with - I'm sure we can provide some guidance!

take care,

Ian


Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
New Post
3/17/2008 4:10 PM
 

dwillcutts wrote

I'm afraid this may be a simple question but I'm new to coding and can't seem to get it straight.  Can anyone tell how to grab the UserId from the token and insert it into a table or datasource.

Thanks

there are currently 2 modules, bundled with DotNetNuke, which support Tokens: Text/HTML and UserDefinedTable. If you are developing custom modules yourself, you can also use TokenReplace to replace tokens by property values of Users (including Profile), Modules, Pages and Portal as well as custom objects within texts. to store Property values in dedicated columns, please access the objects directly, which will be more type save, see e.g. source of feedback module, how to access username etc.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Inserting UserId into a table?Inserting UserId into a table?


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