Changes to Member.makeNew() behaviour in Umbraco 4.0.3 ???
Hi!
I have a piece of code that creates members programatically.
In Umbraco 3.0.6 the code managed to set a 8 characters long password via the piece of code below.
But since i updated my references in VS2008 to use the businesslogic.dll from Umbraco 4.0.3 this doesn't seem to work.
I send an e-mail with the generated password using the newMember.Password property but it turn out that it's a 28 characters long password that might look something like this:
LQI0QHbgJG1wLOB0mDDh6slpHYo=
Is it possible that something might have changed and that Umbraco or .Net generates a password later in the process of creating a new members now?
// Kalle
Member newMember = Member.MakeNew(navRef.reference, MemberType.GetByAlias(memberTypeAlias), new umbraco.BusinessLogic.User(0));
// Generate a 8 characters long password for the new member. newMember.Password = UserHelper.GeneratePassword();
// Keep generating a login name for the new member until a unique one is found. string loginName = string.Empty; do { loginName = UserHelper.GenerateLogin(navRef.reference); } while (Member.IsMember(loginName));
// A unique name was found, assign it to the new user. newMember.LoginName = loginName;
// Set member properties. newMember.Text = navRef.reference; newMember.Email = navRef.email; newMember.getProperty("customerNumber").Value = navRef.customerno; newMember.getProperty("mobilePhoneNo").Value = navRef.mobilno; newMember.getProperty("accountIsActive").Value = true;
// Set the member group. newMember.AddGroup(memberGroupID);
Changes to Member.makeNew() behaviour in Umbraco 4.0.3 ???
Hi!
I have a piece of code that creates members programatically.
In Umbraco 3.0.6 the code managed to set a 8 characters long password via the piece of code below.
But since i updated my references in VS2008 to use the businesslogic.dll from Umbraco 4.0.3 this doesn't seem to work.
I send an e-mail with the generated password using the newMember.Password property but it turn out that it's a 28 characters long password that might look something like this: LQI0QHbgJG1wLOB0mDDh6slpHYo=
Is it possible that something might have changed and that Umbraco or .Net generates a password later in the process of creating a new members now?
// Kalle
Strange thing that posting in a forum makes you think for yourselves...
Of Course something have changed!
The parameter passwordFormat="Hashed" under membership in web.config was set. I removed it and now it work fine again!
// ; ) Kalle
is working on a reply...