Forgotten password implementation

I want to implement a ‘forgotten password’ feature on my Yii website, I’d like this to work ideally in the following way:

[list=1]

[*]User enters their email address registered on the site

[*]An email is sent to that address with a link that will expire within 48 hours

[*]On clicking the link (within the timeframe) a brand new password is auto-generated and sent to that user

[*]Once the link has been clicked it becomes expired and it can no longer be used again

[/list]

My site already has a login functionality, I just require ideally an extension that does the following above that is customisable to allow me to amend various items such as emails etc…

Can anyone point me in the right direction for a Yii 1.x.x website, or any existing vanilla Yii code another user has on their own websites.

Thanks in advance

This Yii blog extension has a password recovery system. You can download it and grab the code you need.

http://www.yiiframework.com/extension/yii-blog/

If you run the demo you will see the password recovery form.

http://yiiblog.ho33.com/en/blog/passwordrecovery

This is just a side note but I stick to safer "no password over email" policy and my #3 is "a form to set new password is displayed" and #4 is "after password has been set or the link expired it can no longer be used again".