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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to grabsign in username from code of DNN???How to grabsign in username from code of DNN???
Previous
 
Next
New Post
4/17/2008 2:50 AM
 

How to grabsign in username from code of DNN

please give me a solution

 
New Post
4/17/2008 4:58 PM
 

Hey nash,

You'll want to create a web user control (ASCX) in your language of choice (VB.NET or C#) that inherits from the PortalModuleBase class (namespace: DotNetNuke.Entities.Modules.PortalModuleBase).

Then you will have access to the PortalModulebase.UserInfo object at runtime and will be able to retrieve values such as username from that object.

You may want to view Michael Washington's DotNetNuke Help Website for more information and tutorials.

Take care,

Ian


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

That is not the only way.  As long as you are working within the DNN environment, you can also do this:

Dim objUser As New DotNetNuke.Entities.Users.UserInfo
objUser = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo
Return objUser.Username

OR

Return DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.Username

However, in the event that you do need to do this within your module or skin object development, you will be able to simply do this:

Return Me.UserInfo.Username

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to grabsign in username from code of DNN???How to grabsign in username from code of DNN???


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