I'm using the CreateUserWizard the AutoGeneratePassword option, to create Members and email them an autogenerated password. But the generated passwords are not very user-friendly, like "#/u¤]?|§£" Is there at way to make the passwords more simple, like (a-z)(A-Z)(0-9)?
Yeah looks like it's generated in the .NET framework, I'm not sure if it's possible to change, unless you hook into the events of the control and generate your own on-the-fly.
Change AutoGeneratePassword format
I'm using the CreateUserWizard the AutoGeneratePassword option, to create Members and email them an autogenerated password. But the generated passwords are not very user-friendly, like "#/u¤]?|§£"
Is there at way to make the passwords more simple, like (a-z)(A-Z)(0-9)?
My code:
<script runat="server"> protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { Roles.AddUserToRole(CreateUserWizard1.UserName, "Group"); } </script> <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" OnCreatedUser="CreateUserWizard1_CreatedUser" AutoGeneratePassword="True" > <MailDefinition> <..........> </MailDefinition> </asp:CreateUserWizard>
You need to configure the PasswordStrengthRegularExpression in the web.config - http://msdn.microsoft.com/en-us/library/system.web.security.membership.passwordstrengthregularexpression.aspx
Are you sure?
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.createuserwizard.autogeneratepassword.aspx
"You cannot create users using the CreateUserWizard if AutoGeneratePassword is set to true and the PasswordStrengthRegularExpression property is set in the application's Web.config. An error message indicating an invalid password will result."
Oh whoops, i miss-read that, I thought it said 'You can create...'
My bad!
I think that the password auto-generation is done by the user control though not Umbraco. I'll have a look
Yeah looks like it's generated in the .NET framework, I'm not sure if it's possible to change, unless you hook into the events of the control and generate your own on-the-fly.
Thanks for your work and time!
Generating my own pass on-the-fly is not a problem, but how do hook into the event?
Hook up with the SendingMail event of the CreateUserWizard exactly as you did with the CreatedUser event. Here's some info on the event and how to use: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.createuserwizard.sendingmail.aspx
Cheers,
/Dirk
is working on a reply...