Copied to clipboard

Flag this post as spam?

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


  • Skippy 10 posts 57 karma points
    Aug 01, 2014 @ 17:02
    Skippy
    0

    Basic stuff - how to create a front-end user login?

    Hello all,

    I'm totally new to both MVC and Umbraco so this is probably a stupid question. I apologise in advance. I'm using Umbraco 7.1.4 in VS 2013, installed from the nuget package.

    I need to implement a front end user login, through a membership provider, to secure various sections of the site. We have an existing SQL Server provider set up to do this from our old webforms world; my question is how do I incorporate this into my Umbraco templates? I understand the MVC paradigm when used in isolation, but shoehorning it into an existing CMS, with its own routing logic, is way beyond me right now.

    Also, if we were able to use the existing provider built-in with Umbraco to do this, it would in fact be beneficial. I could jusifty binning the old provider.

    I have got so far as to creating a login partial [view macro], from the snippets dropdown available in v7 - it appears on the screen, gives me a button to push, and then errors out. I have no clue how to wire it in!

    Thanks, Skip.

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Aug 01, 2014 @ 17:26
    Andy Butland
    0

    The examples Warren has put together here are a pretty good place to look for examples on integrating various membership related tasks.

    Hope that helps

    Andy

  • Skippy 10 posts 57 karma points
    Aug 04, 2014 @ 14:36
    Skippy
    0

    Hi Andy,

    thanks for the reply - that all looks quite comprehensive, but I've still no idea about how to go about using it! There's lots of code, but no instructions. Google did throw up Warren's website though, so I'll have a look around there.

    Edit: Well, I found out why the inbuilt Macro Partial scripts weren't working... the master template still had a rogue style form element (at the root of <body>) which was causing MVC to fail miserably. Having realised that, this article by Siempre Solutions was really helpful!

    http://siempresolutions.co.uk/blog/Umbraco_Members_Protected_Area_of_Website

    Cheers, Skip.

Please Sign in or register to post replies

Write your reply to:

Draft