Lost your password? HOW TO
Moderator: General Moderators
Lost your password? HOW TO
Good day everyone.
I have a login system which has a feature of retrieving the user's password. Is this possible? Because the password are hashed using md5, and i can't get it done, because when the user doesn't have to enter the password again, i can't compare the entered password and the password stored in the database.
If you may, here is my login form http://ioacjci.org/admin/ please login, after you failed to login, a link will appear just below log in button which says lost your password? Click it and it will load the forget password page, and in there, you will be asked for your username. Is there any other way to get this done? The username field is useless. I have tried it and it mailed me the hashed password in the database. It has done it because there is no string that the script will compare from the form and to the database.
Do you know how to fix this?
Thanks in advance.
I have a login system which has a feature of retrieving the user's password. Is this possible? Because the password are hashed using md5, and i can't get it done, because when the user doesn't have to enter the password again, i can't compare the entered password and the password stored in the database.
If you may, here is my login form http://ioacjci.org/admin/ please login, after you failed to login, a link will appear just below log in button which says lost your password? Click it and it will load the forget password page, and in there, you will be asked for your username. Is there any other way to get this done? The username field is useless. I have tried it and it mailed me the hashed password in the database. It has done it because there is no string that the script will compare from the form and to the database.
Do you know how to fix this?
Thanks in advance.
Re: Lost your password? HOW TO
You cant "retrieve" an encrypted password. The only course of action is to reset it and then send the user the new password.
Re: Lost your password? HOW TO
thanks for the response. But how should i do that? I mean after i send the new password to his new email, for example i send a new password namely 1234 and then he fills up the password field 1234. The system will still give him an error message. because at first, it checks the user password and md5 it and check it to the database if it matched.
Do you have a sample script for it? so that i can better understand what you mean
Thanks a lot
Do you have a sample script for it? so that i can better understand what you mean
Thanks a lot
Re: Lost your password? HOW TO
When you generate the new password of 1234 update the record in the database to be the hashed version of that - eg
Code: Select all
mysql_query("UPDATE `user` SET `password` = ".sha1($new_password)." WHERE `user_id` = ".$user_id);Re: Lost your password? HOW TO
Thanks onion2k. Gotta try it. Sir, are you familiar with amfphp?
Re: Lost your password? HOW TO
I know what it is, but I don't use Flash so I've never had any call to use it.
Re: Lost your password? HOW TO
Oh, it's okay sir, Coz I'm trying to get data from the database and display it in the dynamic textfield in flash.
And by the way sir, I got the password retrieval working. Thanks a lot for you help onion2k and ghurtado. GOD bless.
And by the way sir, I got the password retrieval working. Thanks a lot for you help onion2k and ghurtado. GOD bless.
Re: Lost your password? HOW TO
Is there a POST here which talks about automatic logged out during X time of inactivity?
Re: Lost your password? HOW TO
There's a search function for that.. 
but you can do it with cookies for example..
When logged in, set cookie for x time, and on every page, check if there is one, if there is, update it to x time, if there isn't, logout
but you can do it with cookies for example..
When logged in, set cookie for x time, and on every page, check if there is one, if there is, update it to x time, if there isn't, logout
Re: Lost your password? HOW TO
i have searched for "Automatic logout" found few results but didn't find what i was looking for, can i post a new topic regarding it?
Re: Lost your password? HOW TO
Absolutely, ask and you shall receivezplits wrote:... can i post a new topic regarding it?