Copied to clipboard

Flag this post as spam?

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


  • Bogdan 250 posts 427 karma points
    Jul 14, 2010 @ 15:45
    Bogdan
    0

    create members in 4.5

    Hi,

    I'm trying to create new members in umbraco 4.5, using Membership.CreateUser as Member.MakeNew is marked as obsolete. The first problem is that I don't know how to assign a member type to the member. Then I thought I only need one member type so in web.config I changed defaultMemberTypeAlias to the member type I created in the backend. But I get the error Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery. Member.MakeNew works just fine though. What should I do?

     

    Thanks!

  • Aaron Powell 1708 posts 3044 karma points c-trib
    Jul 15, 2010 @ 06:59
    Aaron Powell
    0

    Can you provide the full stack trace for the error?

  • Bogdan 250 posts 427 karma points
    Jul 15, 2010 @ 11:21
    Bogdan
    0

    Slace, I checked the stack trace and easily figured out what was wrong, I wasn't supplying the 3rd Membership.CreateUser param, the email. I didn't do that because the user name is actually the user email. Anyway, it works now, but what do I do if I'll need to use more than one member type? And how do I set custom member properties?

  • Aaron Powell 1708 posts 3044 karma points c-trib
    Jul 16, 2010 @ 00:34
    Aaron Powell
    0

    For custom member properties you can use a ProfileProvider - http://www.aaron-powell.com/umbraco-members-profiles

    For multiple membership types you need to define different providers, and then you just access the one you need as you need it.

  • Bogdan 250 posts 427 karma points
    Jul 16, 2010 @ 10:01
    Bogdan
    0

    Well, I guess I'll continue to use Member.MakeNew as long as it works, it's just much easier.

     

    Thanks!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies