Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Trying to get the CMSContext.CurrentUser View modes: 
User avatar
Member
Member
jasonreber-gmail - 4/11/2009 6:11:11 PM
   
Trying to get the CMSContext.CurrentUser
Not sure if this is the right thread to post this in, but...

I am showing a popup (using Telerik's Rad Window) from a portal .ascx module. This RadWindow calls and .aspx page.

Within that .aspx page, I'd like to be able to get the info about the current user. I tried using CMS.CMSHelper.CMSContext.CurrentUser, but this returned the Public anonymous user.

What's the correct way to get the current logged in user's credentials from an .aspx page in this scenario?

Thanks in advance!

Jason

User avatar
Member
Member
zhaojicheng-artmtech - 4/12/2009 1:21:19 AM
   
RE:Trying to get the CMSContext.CurrentUser
if (!CMSContext.CurrentUser.IsPublic())
{
if (this.AuthenticatedLinkUrl != String.Empty)
{
userInfo = "<a href=\"" + this.AuthenticatedLinkUrl + "\">" + userInfo + "</a>";
}
}
else
{
if (this.PublicLinkUrl != String.Empty)
{
userInfo = "<a href=\"" + this.PublicLinkUrl + "\">" + userInfo + "</a>";
}
}

I wish I could help you

User avatar
Member
Member
jasonreber-gmail - 4/12/2009 1:42:06 AM
   
RE:Trying to get the CMSContext.CurrentUser
Um...thanks Zhao, but....that doesn't work.

Can anyone else help please?

Jason