OK. This is done. The solution is very much based on Wes James patch.
I took the time to clean up tools.py so I hope I did not introduce new
bugs but it is possible.

Now bare this me. The convention is a bit complex but we want:

- keep backward compatibility
- allow people to use the new reset_password if they so choose without
change in views
- allow people to keep the old functionality if they so choose

So now we have two functions:

retrieve_password (old) and reset_password (new)

retrieve_password emails you a new password, reset_password emails you
a token that allows you to change the password when you change it. If
you made your own controllers actions you can swap one for the other
in your code.

reset_password needs to be configured in db.py:

    auth.messages.reset_password =
    'Click on the link http://.../user/reset_password?key=%(key)s to
    reset your password'

If you only use the scaffolding user() action and you set

    auth.settings.reset_password_requires_verification = True

then retrieve_password gets disabled and mapped into reset_password.
You can use

    http://..../user/retrieve_password
    http://..../user/reset_password

and they will behave the same. This means that other than the settings
you will not need to edit your views or menus to change the default
behavior.

Until this goes in stable this behavior may be subject to chance
depending on the feedback I get from users.

Please check it and check if Auth is still working fine.

This could go in stable as soon as tomorrow if people tells me it is
ok.

Massimo


On Jan 14, 4:20 pm, Fran <francisb...@googlemail.com> wrote:
> On Jan 14, 10:15 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > Can you post a list of specific tasks that need to be completed?
>
> Hi Massimo, it's here:
>
> > > If you have JQuery ot web2py experience, please 
> > > visithttp://trac.sahanapy.org/wiki/Haiti.
>
> The best use of your skills would be this one:
>  * Change Password Reset to take users to a password reset page
> instead of just emailing a new password?
>   * More secure
>   * Upstream in Web2Py
>
> Best Wishes,
> Fran.
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to