How to display the link only for registered users?

I am using dotnetnuke version 5.4. I want to show the link after the terms of use and privacy statement (below).

This link should be displayed only after user login. Is there any way to do this? I know how to add a link to a file skin.ascx, but I do not know how to determine if a user is registered or not.

+3
source share
3 answers

In your skin, simply add the following to the desired location.

Vb.net

<% If Request.IsAuthenticated %>
    [Logged in]
<% End If %>

WITH#

<% if (Request.IsAuthenticated) { %>
    [Logged in]
<% } %>

This will display the text “[Login]” only if the user is logged in.

+9
source

HTML-, , .

+1
<% If HttpContext.Current.User.Identity.IsAuthenticated=True Then    %>

   <!-- put your stuff here -->


<% End If %>

Stick to the fact that your skin should do this.

0
source

Source: https://habr.com/ru/post/1778457/


All Articles