Copied to clipboard

Flag this post as spam?

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


  • JJ 41 posts 83 karma points
    Mar 07, 2014 @ 10:56
    JJ
    0

    Member login in Umbraco 7

    Apologies if this is documented somewhere - i cannot find it.

    I want to create a simple registration, login and forgot password/reset password set of pages.

    Can someone point me in the right direction please?

     

    Also, i want to hook into the event fired when a member is updated. How would i go about that in U7?

     

    Thank-you

  • Sam 47 posts 153 karma points
    Mar 07, 2014 @ 15:34
    Sam
    1

    There are some macro templates for login and registration.

    Go to Developer => Partial View Macro Files => Create...

    Templates for Login, Register Member, and Login Status are in there. Leave the box to create a macro checked. After you save, go up to the macros directory and check the box to allow it to be used in the Rich Text Editor.

    Now you should be able to go to your content tree, create a new page, and embed the macro in the content.

  • JJ 41 posts 83 karma points
    Mar 07, 2014 @ 15:48
    JJ
    0

    @Sam, thanks. That's brill.

    Does anyone else know how to do the event hook in?

  • Matt Linsenbardt 24 posts 147 karma points
    Mar 07, 2014 @ 18:32
    Matt Linsenbardt
    1

    There doesn't appear to be any events to hook into on member creation. You might simply make your own registration page and controller so that you can add your workflow items in there.

    http://our.umbraco.org/documentation/reference/Events-v6/

     

  • Matt Linsenbardt 24 posts 147 karma points
    Mar 07, 2014 @ 18:34
    Matt Linsenbardt
    0

    Also, you should be aware that there is a new Membership API in 7.1 if you want/can wait. However, it appears that the membership password/question feature will not be implemented until 7.2.

  • Sam 47 posts 153 karma points
    Mar 07, 2014 @ 18:37
    Sam
    0

    Here's a link to the Umbraco member authentication-related controllers on GitHub. You can use them as templates and roll your own authentication surface controllers.

    https://github.com/umbraco/Umbraco-CMS/tree/6a9a1d1547e7a0508f6bed74c49ee2fd64bcf775/src/Umbraco.Web/Controllers

     

  • JJ 41 posts 83 karma points
    Mar 07, 2014 @ 18:39
    JJ
    0

    Thanks both for the info. I'd love to wait for 7.2 but i have until the end of the month to deliver this project!

     

    @Sam, will check out that link now as it looks like the best way for me.

  • Matt Linsenbardt 24 posts 147 karma points
    Mar 07, 2014 @ 18:52
    Matt Linsenbardt
    0

    Here are some additional resources if you are comfortable with MVC. You can create a document type (e.g. MemberRegistration) and hijack the route. On post, verify the model and register the user using the ASPNET membership api.

    http://our.umbraco.org/documentation/Reference/Mvc/custom-controllers
    http://our.umbraco.org/wiki/how-tos/membership-providers

     

     

  • Brian McNally 16 posts 104 karma points
    May 21, 2014 @ 18:37
    Brian McNally
    0

    Thanks Sam for the tip on the Macro. So I've setup a basic login page to authenticate the user. Dumb newbie question, but how do you redirect the user to the requested page? After they login, they just sit on that login page. Thanks

  • JJ 41 posts 83 karma points
    May 22, 2014 @ 16:23
    JJ
    1

    If you use the Public Access option on the node and children you are wishing to secure, it will redirect to the login page and back again once logged in.

  • Matt Linsenbardt 24 posts 147 karma points
    May 22, 2014 @ 17:16
    Matt Linsenbardt
    0

    It is very easy to setup a surface controller to manage logins and direct the user to wherever you would like. There is a greate write up here:

    http://24days.in/umbraco/2012/creating-a-login-form-with-umbraco-mvc-surfacecontroller/

     

Please Sign in or register to post replies

Write your reply to:

Draft