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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...In custom skin, how can I detect if user is authenticated?In custom skin, how can I detect if user is authenticated?
Previous
 
Next
New Post
12/20/2012 2:38 PM
 

We have a public DNN 6.2 web site and only admins and content editors can login to it. The site isn't interactive or social, so nobody else can logon or create accounts, etc. To present a less tempting target for hackers, we don't even show a login link, but our admins know the name of the login page. 

We want to show a logout link, though, if a user is logged in---and maybe a link to the account management page. We developed the skins ourselves, and I know VB and C#, but have done no real DNN development besides making the skin somewhat adaptive for mobile users. 

I'm thinking there's a DNN object in a some namespace that I could ask if the user is logged in or has a non-empty name attribute or something. (I looked for DNN API documentation, but can't find any, aside from some tutorials. Am I just dense?) Can someone please point me to the right object and namespace, and I can probably figure out the rest. Thanks in advance.


 
New Post
12/20/2012 2:59 PM
 

A variation of this should work:

<% If Request.IsAuthenticated %>
           You are Logged In 
 <% End If %>




Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
12/20/2012 3:16 PM
 
Joe, many thanks, that works. (I didn't think to try the normal ASP.NET method, I assumed DNN had its own authentication stuff.)
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...In custom skin, how can I detect if user is authenticated?In custom skin, how can I detect if user is authenticated?


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