Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Oct 14, 2013 @ 16:29
    Biagio Paruolo
    0

    Razor sign up form and member profile...

    Is there an example of razor member signup form and edit member profile?

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Oct 16, 2013 @ 09:55
    Biagio Paruolo
    0

    ?

  • Anders Schmidt 76 posts 207 karma points
    Nov 16, 2013 @ 00:18
    Anders Schmidt
    0

    I would like to know i you found a solution?

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Nov 16, 2013 @ 17:40
    Biagio Paruolo
    0

    This is my solution:

    if (Member.GetMemberFromEmail(email) == null)

    {

    var memberType = new MemberType(1109);

    var persona = string.Concat(nome," ",cognome);

    try{

    Member newMember = Member.MakeNew(persona, memberType, new umbraco.BusinessLogic.User(0));

     

    newMember.Email = email;

    newMember.LoginName = username;

    newMember.Password = password;

    newMember.getProperty("privacyAccettata").Value = 1;

    if (privacycassiopea=="Si"){

    newMember.getProperty("privacyCassiopeaImageNewsletter").Value = 1;

      }

      else{

    newMember.getProperty("privacyCassiopeaImageNewsletter").Value = 0;

      }

    if (privacyterze=="Si"){

    newMember.getProperty("privacyTerzeParti").Value = 1;

    }

      else{

    newMember.getProperty("privacyTerzeParti").Value = 0;

    }

      

    newMember.Save();

     

    return "true";

    }

     

     catch (MembershipCreateUserException e)

     {

    //msg = GetErrorMessage(e.StatusCode);

    msg= e.Message;

    return @msg;

     }

     catch (HttpException e)

     {

     msg = e.Message;

     return @msg;

     }

    }

     else

    {

     return "false";

    }

  • Charles Afford 1163 posts 1709 karma points
    Nov 16, 2013 @ 18:46
    Charles Afford
    0

    Hi you can find an implimentation @ http://www.charlesafford.com/umbraco-membership-provider.aspx

    Hope this helps :)

Please Sign in or register to post replies

Write your reply to:

Draft