40FINGERS "DNN Framework Attributes" Demo Skin

Page skin: 40F Skin Demo Framework-Attributes // 04.00-Demo-Skin-Attributes-Security.ascx

    This skin shows you some of the DNN Framework data you can use in your skins (just like you can use <%=SkinPath%>)
    The part between <%= and %> will be replaced dynamically by the Framework.
    Everything in Blue is the dynamic result of the Token mentioned on the previous line
    These are supposed to be used in ASCX skins.

    If you have any remarks or questions, please let me know.

    2017-05-24, Timo Breumelhof


    Security

    Is the visitor logged in?

    IIf(Request.IsAuthenticated, "LoggedIn", "NotLoggedIn")
    NotLoggedIn

    User

    Currently logged in UserName

    UserController.GetCurrentUserInfo().Username

    Currently logged in User Display Name

    UserController.GetCurrentUserInfo().Displayname

    Portal Profile Page

    NavigateURL(PortalSettings.UserTabId)
    https://demo.40fingers.net/dnn-framework-attributes-demo-skin/Activity-Feed

    Link to User Account Pagee

    Dim objUserInfo2 As UserInfo = UserController.GetCurrentUserInfo If objUserInfo2.UserID <> -1 Then Dim sMyAccountLink = NavigateURL(PortalSettings.UserTabId, "Profile", "userId=" & UserController.GetCurrentUserInfo().UserID, "pageno=1") Response.Write(String.Format("Your Account", sMyAccountLink)) End If

    Current User Creation Date

    UserController.GetCurrentUserInfo().CreatedOnDate
    1/1/0001 12:00:00 AM

    Current User Email

    UserController.GetCurrentUserInfo().Email

    Current User FirstName

    UserController.GetCurrentUserInfo().FirstName

    Current User LastName

    UserController.GetCurrentUserInfo().LastName
    >

    Current User Id

    UserController.GetCurrentUserInfo().UserID
    -1

    Current User Profile Properties

    UserController.GetCurrentUserInfo().Profile.GetPropertyValue("Property")
    FirstName:
    LastName:
    Country:

    Current User PhotoUrl

    UserController.GetCurrentUserInfo().PhotoURL
    /images/no_avatar.gif
    <img src="<%=UserController.GetCurrentUserInfo().Profile.PhotoURL%>" />

    Is Current User SuperUser / Host

    UserController.GetCurrentUserInfo().IsSuperUser
    False
    You are <%If NOT UserController.GetCurrentUserInfo().IsSuperUser%>NOT<%End If%> a Superuser
    You are NOT a Superuser