Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Solomon Closson 22 posts 42 karma points
    Aug 24, 2014 @ 22:27
    Solomon Closson
    0

    Umbraco 4.6.1 - How to determine if user is logged on or not?

    Hello using the following code in my usercontrols .cs file:

    Page.User.Identity.IsAuthenticated
    

    But this always returns false. How can this be done in Umbraco version 4.6.1??

    Have also looked at the following code:

    umbraco.library.IsLoggedOn()
    

    Both of these always returns false, even when I am logged in. How to check if user is logged in correctly?? Trying to get this on the front-end. Is there a way to do this on the front-end?

    I need to determine if USER is logged in, not Member! Anyways to do this on the front-end??

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 25, 2014 @ 12:10
    Jeroen Breuer
    0

    Hello,

    The code you are using is only to checker if a member is logged on. It's not for users.

    Try this:

    if(umbraco.BusinessLogic.User.GetCurrent() != null)

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft