Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Jul 08, 2012 @ 14:54
    Anthony Candaele
    0

    how to programmaticaly set the MemberShipProvider

    Hi,

    I dropped the CreateUserWizard for my custom registrion page.

    However, there is one thing I need to sort out:

    I use two UmbracoMembershipProviders:

    UmbracoMembershipProvide and UmbracoMembershipProvider2.

    The first provider is for member of MemberType 'jobseeker', the second is for MemberType 'employer'

    I then need to set the MembershipProvider based on a value ("jobseeker", "employer") that was chosen by the user from a dropdownlist.

    When using the CreateUserWizzard, I could do this in the _CreatingUser event:

    creatuserwizzard.MembershipProvider = UmbracoMembershipProvider2;

    So my question is, is there a way to set the MembershipProvider programmaticaly when creating a new member in Umbraco?

    Thanks for your help,

    Anthony

  • Anthony Candaele 1197 posts 2049 karma points
    Jul 16, 2012 @ 19:49
    Anthony Candaele
    0

    Hi,

    Anyone has an idea if the Member.MakeNew() method to create members of a given membertype still works, eg:

    Member.MakeNew("John Smith", mt,new umbraco.BusinessLogic.User(0));

    Although this way of creating new members is deemed deprecated, I have to use this method because I don't know otherwis to create a member of a given membertype.

    I works fine, but when I try to login with the newly created member account I get the message that attempt to login was unsuccesful

    Thanks for your help,

    Anthony

  • 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