i would just create a separate db table for this. Generate some sort of md5
hash and urlencode it into a "click here to create new password" link
in the
app.
when user clicks the url in the email they got, rails matches the md5
string in the URL against an entry in the DB. If its there, delete the
record , update user with a temp pass in the user table, and email it to the
user.
Make sure to clean up the table every few days. IF they dont update their
pass those records should be purged frequently.
adam
On 5/16/06, sharmila devi <sharmilanc19@yahoo.co.in>
wrote:>
> hi rails gals and guys
> im creating authentication using username and password,i wants to know
> how to retrive the username and password,if user forgot the username and
> password by asking secret question and secret answer
> e.g : what is your pet''s name?
>
> if anyone knows how to implement tis,plz send your suggestions and ideas.
>
> N.C.Sharmila
>
>
>
>
>
>
> ------------------------------
> Why was V. Sehwag warned by the BCCI? Share your knowledge on Yahoo!
> Answers
India<http://us.rd.yahoo.com/mail/in/mailanswerssehwag/*http://in.answers.yahoo.com/question/index?qid=1006051032589>
> Send instant messages to your online friends -
NOW<http://us.rd.yahoo.com/mail/in/messengerbeta/*http://messenger.yahoo.com/download.php;_ylt=Ah5_.LTcbbJtYrNKnfM5e6xwMMIF>
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060516/8f9fcc14/attachment-0001.html