Last post Sep 28, 2005 03:13 PM by ErikVB
Sep 28, 2005 11:01 AM|mpharis|LINK
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?
Sep 28, 2005 03:13 PM|ErikVB|LINK
the core iframe module does not support this, you should create a custom iframe module, where you pass the userid and name to the frame.
from within a module, the userid is me.userid and me.userinfo gives all info about the user, including its name