Copied to clipboard

Flag this post as spam?

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


  • Klaus Pedersen 15 posts 71 karma points
    Mar 30, 2011 @ 13:17
    Klaus Pedersen
    0

    MembershipUser

    Hello I have a problem when trying to let people signup as members i tried adding the member with the old way(its out commented) but when i get to the line CreateUser then it throws an exception saying Duplicate User name! A member with the user name test already exists. And no matter what name i use it keeps saying that. Can anyone put some light on this issue

     

    var mt = MemberType.GetByAlias("ForumUser");

    var addToMemberGroup = MemberGroup.GetByName("ForumUser");

    //create a member

    //var m = Member.MakeNew(Server.HtmlEncode(username), mt, new umbraco.BusinessLogic.User(0));

    MembershipUser user = System.Web.Security.Membership.CreateUser(username, password,email);

     

  • Yannick Smits 321 posts 718 karma points
    Mar 30, 2011 @ 13:55
    Yannick Smits
    0

    are you using the asp:CreateUserWizard?

  • Klaus Pedersen 15 posts 71 karma points
    Mar 30, 2011 @ 14:49
    Klaus Pedersen
    0

    Hey Yannick

     

    No im using my own controls

  • Yannick Smits 321 posts 718 karma points
    Mar 30, 2011 @ 14:51
    Yannick Smits
    0

    debug time I guess, hard to help your more from just these lines of code, they look correct.

  • Jonas Eriksson 930 posts 1825 karma points
    Mar 30, 2011 @ 15:11
    Jonas Eriksson
    0

    Hi, I recognize this, it might be because of an existing empty string username for an existing user (error msg is wrong), it might be worth having a look in the db. umbracoMembers table

  • 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