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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameHow to retrieve the dnn UserName How to retrieve the dnn UserName
Previous
 
Next
New Post
9/27/2005 5:21 PM
 

I am new to ASP.Net and DNN. I have a custom application that is running in an IFrame and need to retrieve the DNN User Name (logged in User).

I've tried the following VB.Net code::::

Dim PortalID As Integer, UserID As Integer
Dim UserName As String
Dim dnnUserCtrl As New DotNetNuke.Entities.Users.UserController
Dim dnnUserInfo As New DotNetNuke.Entities.Users.UserInfo

PortalID = dnnUserCtrl.GetCurrentUserInfo.PortalID
UserID = dnnUserCtrl.GetCurrentUserInfo.UserID
Username = dnnUserCtrl.GetCurrentUserInfo.Username

Resulting values are:

PrortalID = -1, UserID = -1, and Username = ''

 

What can i do to retrieve the User Name?

 
New Post
9/29/2005 12:08 PM
 
I've got the same question, is it possible or not?
 
New Post
9/30/2005 9:02 AM
 

I've not yet gotten it working but i found some interesting ways to get the User or User id at http://forums.asp.net/1045674/showpost.aspx   

The way I understand it, an application opened through an IFrame does not have access to the DotNetNuke properties because it is in like another independent session. So this site discusses ways to pass the specific property values to the new URL/Application without modifing the DNN core code.

 
New Post
1/12/2006 7:21 PM
 

On a more technical level, there is a way to create an ASPX page in ones DNN project and inherit from DotNetNuke.Framework.PageBase.  The idea is to then get this page to show up in the IFrame.

The problem I am having is that even by doing this, it doesnt seem to be aware which portal called the page.  Even if my IFrame is on portal 123, the page in the IFrame (again, while inheriting PageBase) thinks that it is on portal 0.

Any thoughts?

 
New Post
1/16/2006 10:45 PM
 
Currently, this is not possible with only the IFrame. Expect it to be added in the future, tho. Once a new project lead is assigned, you will probably see some quick turn-arounds in the next release, which should incude this capability, since its probably the most requested addition.

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameHow to retrieve the dnn UserName How to retrieve the dnn UserName


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