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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Is there any way to grab some user identifier for my modules?
Previous Previous
 
Next Next
New Post 7/31/2008 6:37 PM
User is offline Dave
3 posts
10th Ranked


Is there any way to grab some user identifier for my modules? 

I use the default DNN user management system to register users and create user groups etc.  Once a user logs in, I was wondering if there is any way to grab some existing user identifier for use in my home made modules?  In other words, say I want to pull data specific to User John (I store his data in a table along with 99 others and pull the data into a gridview).  Is there any existing perhaps session based user identifier that the default DNN users management system uses that will allow me to pull data based on User Johns User ID?

Thanks

Dave

 
New Post 8/1/2008 8:46 AM
User is offline Dave
3 posts
10th Ranked


Re: Is there any way to grab some user identifier for my modules? 

I do apologize, I figured it out myself.  For others like myself here's the answer (very simple):

        Dim uid = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.UserID
        Response.Write(uid)


Note you can get all sorts of fun user info ....

        Dim uid = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.Roles

or

        Dim uid = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.Lastname

 

 
New Post 8/1/2008 10:44 AM
User is offline Carlos Rodriguez
536 posts
www.almacigo.com
8th Ranked


Re: Is there any way to grab some user identifier for my modules? 

Dave:

You can always use UserID without having to define anything.  It will be -1 if the user is not logged in.  If you need the rest of the user info after they login then the way you mention is the way to go.

Carlos

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Is there any way to grab some user identifier for my modules?
 


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.

 


TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk
Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com

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