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  |  

$4.95 Windows Hosting at Webhost4life.com
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

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
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  getting the user info...
Previous Previous
 
Next Next
New Post 2/21/2006 11:15 AM
User is offline Rob Morrow
23 posts
www.deviant-tuning.com
10th Ranked


getting the user info... 
i'm new to dotnetnuke module development and this whole data provider thing, so please be patient with me. :) i'm attempting to populate a dropdown with information from a database table which uses the userid to identify a record. i'm having issues with how to get the dnn userid. is it stored in session when the user signs in? any help would be greatly appreciated. thanks in advance.
 
New Post 2/21/2006 11:15 PM
User is offline Dave Buckner
96 posts
www.DaveBuckner.com
10th Ranked


Re: getting the user info... 

There is a property called UserInfo on the base class your module should be inherting.(DotNetNuke.Entities.Modules.PortalModuleBase). UserInfo has the details your after. So you could use (this|me).UserInfo.UserID, or if you don't need the extra details involved in the UserInfo object you could also use (this|me).UserId as well.

Forgive the C# below, if you need a vb version and C# is totally off the wall to you let me know and I will list that as well. Anyway, To load a userinfo up from an ID you have or have stored stored somewhere like the db =), you can get the details of them like so...

DotNetNuke.Entities.Users.UserController oUserController = new DotNetNuke.Entities.Users.UserController();

DotNetNuke.Entities.Users.UserInfo oUserInfo = oUserController.GetUser(this.PortalId, iSomeUserID);

oUserController = null;

//Set Some Label or textbox.Text of the username

txtSomeTxtBox.Text = oUserInfo.Username;

//Etc.

HTH's,

Dave

 
New Post 2/22/2006 7:40 AM
User is offline Rob Morrow
23 posts
www.deviant-tuning.com
10th Ranked


Re: getting the user info... 
this would be outstanding in vb. i hate to be a pest, but if you could post the vb code, i'd be in heaven.
 
New Post 2/22/2006 7:48 AM
Online now... Leigh Pointer
462 posts
www.subzero-solutions.net
8th Ranked










Re: getting the user info... 

This line will return you the Id of the currently logged in user:

   UserController.GetCurrentUserInfo.UserID


Leigh Pointer
User Group Champion [World Wide]
» Evangelising DotNetNuke Everywhere «

Dutch DotNetNuke User GroupSubzero SolutionsSoftware Developer Network
 
New Post 2/22/2006 11:18 AM
User is offline Rob Morrow
23 posts
www.deviant-tuning.com
10th Ranked


Re: getting the user info... 
this, i believe, works like a charm. thank you, much. for best practice purposes, i've put this into the moduleinfo.vb business layer file in the constructor section like follows...

Me.UserId = GetCurrentUserInfo.UserID
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  getting the user info...
 


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.

 


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
Module Development by Engage Software
Specializing in custom module development, training and skinning.
www.engagesoftware.com

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