Developer forum

Forum » Development » Set password
Per Ljung
Reply
Hi!

When creating an extranet user using the api, is there a way to generate a password or do you have to set the password manually?

Has Dynamicweb a built-in routine for generating passwords?

Best regards,
Per

Replies

 
Morten Bengtson
Reply
This post has been marked as an answer
You can generate a password like this...
user.Password = Dynamicweb.Base.PasswordGenerate("8");
This will generate a random string of 8 characters.
The parameter should be a numeric string value. If you pass string.Empty, it will default to 8.
Votes for this answer: 0

 

You must be logged in to post in the forum