Copied to clipboard

Flag this post as spam?

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


  • John 5 posts 24 karma points
    May 16, 2013 @ 06:24
    John
    0

    umbraco 6 membership register

    Can someone provide a simple explaniation of how I'd go about creating a member sign up form?  I've tried various things that I found, but none have worked thus far for me.  Not sure what I'm missing.

    I have a member group created named "Customers", and a member type named "Customer". I have a page named Register that uses a template named register that for simplicities sake I'd like to drop in my register form code into.  Oh and I've updated my web.config defaultMemberTypeAlias="Customer"

    Whats the the correct code to place in the template?

    I've tried something like below, but it didn't seem to do anything:

    <script runat="server">
    protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
    {
        Roles.AddUserToRole(CreateUserWizard1.UserName, "Customers");
    }
    protected void CreateUserWizard1_ContinueButtonClick(object sender, EventArgs e)
    {
        Response.Redirect("/member-area.aspx");
    }
    </script>

    <asp:CreateUserWizard ID="CreateUserWizard1" OnContinueButtonClick="CreateUserWizard1_ContinueButtonClick" OnCreatedUser="CreateUserWizard1_CreatedUser" runat="server">
        <WizardSteps>
            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server"></asp:CreateUserWizardStep>
            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server"></asp:CompleteWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>

  • Charles Afford 1163 posts 1709 karma points
    May 16, 2013 @ 16:19
    Charles Afford
    0

    Hi i cannot see anything in that code where you are creating a member just adding a user to a role?

    do you mean a user? (Can login in to umbraco) or member (Can login to the website)

    With 6.0 you will need to use the asp.net membership provider.  Take a look at my post at 

    http://charlesafford.com/post/2012/10/15/Umbraco-members-and-ASPnet-membership-provider

    That will point you in the right direction :).

Please Sign in or register to post replies

Write your reply to:

Draft