Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
force password change
Old 01-03-2012, 10:52 PM force password change
Junior Talker

Posts: 1
Trades: 0
Ok so I have successfully set up a password reset script that when clicked on send the user a new password, now i want to expand the login system and force the user to set a new password on next login, how would i do this?
andrewm2 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-03-2012, 11:29 PM Re: force password change
NullPointer's Avatar
Will Code for Food

Posts: 2,883
Name: Matt
Location: Irvine, CA
Trades: 0
Store some sort of flag in the database for that user so the script will know that they must change their password. When a user requests a new password set it to 1. Once they update their password set it to 0. Without knowing more about your db structure it's hard to say exactly how you should create the flag (ie as a new column in the user table, as meta data, etc).

Normally, wouldn't such a script just generate a random string for the password, send it to the user, and then let the user reset it on their own if they choose to. Why do you want to force users to set a new password immediately?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 01-03-2012 at 11:34 PM..
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 01-04-2012, 07:58 AM Re: force password change
chrishirst's Avatar
Defies a Status

Posts: 44,055
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Normally, wouldn't such a script just generate a random string for the password, send it to the user, and then let the user reset it on their own if they choose to. Why do you want to force users to set a new password immediately?
From my own practice when I have had to do a password reset request, that is exactly what I do.

However to deal with the case where a script delivers a simple password to allow access and you want to give a "provide new password" page.

You could add another table with a structure of userID & password reset flag to the DB schema and check if the user is listed when they login.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to force password change
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23484 seconds with 11 queries