Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Apr 08, 2011 @ 06:42
    Tom
    0

    Umbraco 4.7 Membership changes?

    Hi Guys,

    I've recently upgraded to 4.7.. since doing so members have had issues logging in.. I was wondering if there was anything i needed to do to get logins working properly in 4.7 has the password hashing algorithm changed or anything like that?

    Cheers,

    Tom

  • Jan Skovgaard 11264 posts 23594 karma points MVP 9x admin c-trib
    Apr 08, 2011 @ 08:09
    Jan Skovgaard
    0

    Hi Tom

    What version of Umbraco did you upgrade from?

    /Jan

  • Tom 713 posts 954 karma points
    Apr 08, 2011 @ 08:12
    Tom
    0

    Hi Jan,

    I upgraded for 4.5

     

    I'm trying to create a new member and assign properties to it in the code behind.. 

    protected void CreatedUser(Object sender, EventArgs e)
            {
                var UserNameTextBox = (TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("UserName");
                string username = UserNameTextBox.Text;
    
                var User = Membership.GetUser(username);
                var member = new Member((int)User.ProviderUserKey);
    
                var FullNameProperty = member.getProperty("fullName");
                var FullNameTextBox = (TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("FullName");
                FullNameProperty.Value = FullNameTextBox.Text;
    
                var DateOfBirthProperty = member.getProperty("dateofBirth");
                var DateOfBirthTextBox = (TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("DateOfBirthTextBox");
    
                DateOfBirthProperty.Value = DateTime.ParseExact(DateOfBirthTextBox.Text, "d/M/yyyy", null, System.Globalization.DateTimeStyles.AllowWhiteSpaces);
    
                var NewsletterOptInProperty = member.getProperty("newsletterOptIn");
                var SubscribeCheckBox = (CheckBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("SubscribeCheckBox");
                NewsletterOptInProperty.Value = SubscribeCheckBox.Checked ? 1 : 0;
    
                var CountryProperty = member.getProperty("country");
                CountryProperty.Value = ((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("CountryDropDownList")).SelectedValue;
    
                var StateProperty = member.getProperty("state");
                StateProperty.Value = ((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("StateDropDownList")).SelectedValue;
    
                Roles.AddUserToRole(member.LoginName, "Public");
                member.AddGroup(1068);  // Group ID
                member.Email = member.LoginName;
    
                member.Save();
            }

    This is resulting in a call to

     [Obsolete("Use System.Web.Security.Membership.CreateUser")]
            public static Member MakeNew(string Name, string LoginName, string Email, MemberType mbt, User u)
            {
    

    How would you suggest I go about achieving this in the new version?? Cheers, Tom

  • Tom 713 posts 954 karma points
    Apr 08, 2011 @ 08:42
    Tom
    0

    I have had a number of complaints from existing members..

    The site was using 4.5.2 and i upgraded to 4.7 since then members coming in haven't been able to log in.. the membership provider in web.config hasn't changed from the previous version and their passwords are all hashed.. but they can't login.. reset their password and yes they can log in.. but for some reason their existing passwords aren't working..

    also it looks like the persistant cookie like remember me is set even though I have the checkbox not shown in my standard login control

  • Giorgos Grispos 145 posts 179 karma points
    Sep 26, 2012 @ 09:44
    Giorgos Grispos
    0

    Hi Tom,

    Any update on this bug? I got the same problem 4.5.2 to 4.7.2 and users can't login, tried the forgotten paswword and when a new password sent login works properly.

    Any solutions?

    Cheers, Giorgos

Please Sign in or register to post replies

Write your reply to:

Draft