0

hi....can i ask something? i need to set a default password for a sign up form... so when new user sign up, they will get a default password and for the first time they log in, they will received a prompt or a msessage asking them to change their password. how can i fix that?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by missMira
0

Two questions: 1) Why do you need a default password?
2) How is the default password generated?

0

You need to create another column or entity that will hold a value to show whether or not the default password was changed.

If you are working with a database (and not a text file or so) then you can create a new column for this, let's call the column pchanged.

Upon user registration, pchanged will get a value representing that the password is still at default, let's say this value is set to 0.

Now when the user logs in, the value of pchanged will be checked. If it is 0, a prompt or some sort of notice on the page will inform the user to change default password.

Once the password is changed, pchanged should be set to some other value besides 0, so that the notice/prompt won't call user attention again.

You will need to understand if..else/switch statements to accomplish this task.

As well as good understanding on how to retrieve and manipulate data from whatever storage protocol you are utilizing.

Hope that helps.

0

Two questions: 1) Why do you need a default password?
2) How is the default password generated?

i need a default password that is set when new user sign up... because the sign up process will be doen by the admin..and admin need a default password instead of asking the password from user.. n the password is generated by setting in the coding

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.