473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Good Forgot Password Script?

Anyone have a good script to provide users with the opportunity to have
their password changed, and then the new one emailed to them?

Jul 16 '05 #1
1 7015
> Anyone have a good script to provide users with the opportunity
to have their password changed, and then the new one emailed to them?


I just did one. I won't provide the whole damn code, but here's a sketch
of how it works:

(I assume Your user has an account with a unique username and a mail
address. Otherwise this won't work. No new mail address will be accepted
when requesting a new password, of course.)

1. User provides his username in sendpassword.php
2. sendpassword.php does:
* insert username and new random password into a separate
table (not the usertable!)
* send link to ->changepassword.php with username and new
password to mail address from usertable,
commenting that someone (not necessarily the account owner)
has applied for a new password.
3. changepassword.php accepts username and newpassword,
deletes values from temp table and sets new password value
(md5()!)
If You're really nice, provide an input field to change the
random password instantly to a personal password.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!
Security issues:
* All Your password fields are md5 encrypted
* use https, if You can
* use a routine to expire the temp values in a set interval of,
say, 24 hours
* If Your user's data is /very/ delicate, _do_not_use_this_method_!
(Mail is not safe)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!

(anyone have improvements?)

Enjoy coding!

rudi

Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DDK | last post by:
I really wish there were some examples explaining how to create a forgot password email link system when you encrypt a password in a database and use ASP.NET/C# preferably. Since the password is...
2
by: kuldeep singh sethi | last post by:
Hey Friends, I have searched in google to get information about "forgot password ?". but didn't satisfy.i need help for this code. i want code for forgot password. I have no idea how to send...
2
by: chaos | last post by:
Hi all, i need help in this forgot password page, as the error message is show in another page cause the arrangement of the design in a mess. As i want to show the error message on the forgot...
2
by: whitey | last post by:
Can anybody supply me with a script the does what is in the title above please? I have tried so many different methods! here is what im currently trying to get to work SIGN IN <!doctype...
1
by: groupie | last post by:
Hi, I'd like to know how to implement the "Forgot Password" feature on many websites which require a login, exactly like this ebay example:...
10
matheussousuke
by: matheussousuke | last post by:
Hi, guys, I'm developing a script and it's almost done, just left two little things: Forgot password option Change password option About forgot password: The user can use as many user names...
1
by: lisa007 | last post by:
i have a form if user forgot password it send the new password to the user email but now i'm trying to is to also send when user register but is not wrking this is the forgot password which works...
3
by: fartingiscool | last post by:
Hiya guys, I am a basic php programmer, I'm currently doing a forgotten password feature for a project and only started working on it last night. I was succuessful to set up a form and a database to...
9
matheussousuke
by: matheussousuke | last post by:
I'm currently working on a script, it's a forgot password script, it recognize the user email when you type it correctly in the input field (so it find the email on the database), generate a random...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.