It is not user.update(pass = request.vars.new_pass)
it is user.update_record(pass = request.vars.new_pass) because user.update(pass = request.vars.new_pass) just updates the user row in ram, not the db. On Jan 3, 11:04 am, "Lucas R. Martins" <[email protected]> wrote: > Hi folks, > > i'm try to run the following code: > > form=FORM('Nova senha:', > INPUT(_name='new_pass',_type='password', > requires=IS_NOT_EMPTY()), > BR(),'Confirmação:', > INPUT(_name='confirmation',_type='password', requires= > IS_EQUAL_TO(request.vars.new_pass, error_message=T('As senhas não > coincidem'))),BR(),BR(), > INPUT(_type='submit')) > > if form.accepts(request.vars, session): > user = db(db.users.name==request.args[0]).select().first() > user.update(pass = request.vars.new_pass) > db.commit() > session.flash = 'Password changed' > redirect(URL('default','index')) > > This code runs with no errors, but my database is not being updated. I > put the line "db.commit()", but the problem keep happing. > > Anyone can help me? > > Lucas R. Martins

