Copied to clipboard

Flag this post as spam?

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


  • pat 124 posts 346 karma points
    Feb 01, 2011 @ 16:04
    pat
    0

    How to check visiter looged in or not

    I'm not sure whether I am in coorect forum, in my site I am going to keep customer user registration process, with custam tables and user controls to add as macro.

    when user logged in user control code behind adding variables to session to indicate user logged in. Some pages I need to restrict view for anonymous users, How do I check on pageload is session("user") is null or empty redirect to login page or some thing...

    I have seen umbraco.library.loggedinuser() what is this is this for umbraco CMS users or website users?

    how to do this please?

     

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 01, 2011 @ 16:50
    Kim Andersen
    0

    Hi Pathini.

    The umbraco.library:IsLoggedOn() extension will tell you if the current user is currently logged on the website. Not in the backoffice, but if the user has logged on from the frontend of the website. And you can of course use this extension in both XSLT and C#.

    I hope that clears things a bit :)

    /Kim A

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 01, 2011 @ 17:08
    Jan Skovgaard
    1

    Hi Pathini

    As Kim is saying you can use the IsLoggedOn() extension to see if a user is logged in or not.

    I'll like to supplement this, with a link to the Wiki where you can see how to use HasAccess and IsProtected in order to decide if a member has access to some specific content that is protected - Read more about it here: http://our.umbraco.org/wiki/reference/umbracolibrary/hasaccess

    Hope this helps.

    /Jan

  • pat 124 posts 346 karma points
    Feb 02, 2011 @ 10:29
    pat
    0

    Sorry I am bit confused. If I am using custom tables and my own form (user control) to register users and then login users. So How does umbraco.Library.isloggedon() know that user logged in or not. sorry I am very new to umbraco , but have good expeirence to develope website with server side scripting, I have done a shopping cart from scratch too, so all i need is to intergrate more functionalities for this umbraco based site.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 02, 2011 @ 21:09
    Kim Andersen
    0

    Hi Pathini

    I don't know how much you have already made with your custom table, but with Umbraco you can use the standard membership functionallity in .NET. This measn that you can use the standard controls for login etc. And the members will be created in the section called "Members" inside Umbraco. Maybe you should consider this, and then you can use all of the build in functionallity for maintaining members, the extension build for this etc. It's actually very handy :)

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft