Hi guys!

I've got a problem trying to build a form for changing password. Here is my
controller:

@auth.requires_membership('regular_user')
def password_change():
    form = auth.change_password(next=URL('step2'))
    if form.process().accepted:
        reg = db.regular_user(db.regular_user.ruid==auth.user.id)
        reg.state = 'step2'
        reg.update_record()
        session.flash = "Thanks for updating your password!"
    return dict(form=form)

The view only have {{=form}}.

The form loads, and apparently sends the data but the password on the DB
isn't get updated. The state of the regular user on the table regular_user
is changed after the form was sent.

What am I missing???

Thanks in advance!!!

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to