Mail back password

M

MattB

I'm working on implementing a feature in a web site to let a visitor create
a new account and have it email a randomly generated password back to the
user. I'm not too concerned about it, but thought I'd check and see if
anyone has any good examples of this that could save me a little time. LMK.
Thanks!

Matt
 
A

Alek Davis

Matt,

If you allow users to create accounts (and by this I mean being able to
select a user name), why can't they define their own passwords? Anyway, if
you are looking for a sample of random password generator (e.g. if you want
to reset and send a random password if user forgets it), take a look at this
one: http://www.obviex.com/Samples/Password.aspx.

Alek
 
M

mikeb

Alek said:
Matt,

If you allow users to create accounts (and by this I mean being able to
select a user name), why can't they define their own passwords?

This is a common way to validate the email address - both that the
address exists and that it does not belong to someone else.
 
A

Alek Davis

OK, fair enough.

Alek

mikeb said:
This is a common way to validate the email address - both that the
address exists and that it does not belong to someone else.
 
M

MattB

Yes, that's one reason. The other is that the records may already exist
(web-enabling legacy system) and we don't want people to be able to access
others' records.

Thanks for the example. I'll check it out!

Matt
 
T

TomS

I use 6 char passwords. You can add any characters you desire into the
pickstring string, just make sure you increase/decrease the 71
character count in the tempPW setup. Call this function to get a temp
PW then email it. Good luck, Tom.

Function build_random_temp_pw()
Dim pickstring, tempPW as string
pickstring = "ABCDEFGHJKLMN6PQRSTUVWXYZ123456789abcdefghkmnzpqrstuvwxyzeth3649xwamk74v"
Dim oRand as New Random(Environment.TickCount)
Dim x as integer
FOR X = 1 to 6
tempPW = tempPW & pickstring.Substring(oRand.Next(1,71),1)
NEXT
Return tempPW
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top