Sorry for the delay in answering.

I have the following code for modify the auth_user table:

    administrador = db2.auth_user(request.args(0)) or 
redirect(URL('ver_administradores'))
    form = SQLFORM(db2.auth_user, administrador, submit_button="Aceptar", 
deletable=True, showid=False)  # update SQLFORM

    if form.validate():
 
            nombre = request.vars.first_name
            apellidos = request.vars.last_name
            usuario = request.vars.username
            myPassword = request.vars.password # I received the password 
field of the form
            ...
  
            
db2(db2.auth_user.id==id_administrador).update(first_name=nombre, 
last_name=apellidos, username=usuario, 
password=db2.auth_user.password.validate(myPassword)[0], ......) 

I need to save the password using the update method. 
How can I know if the user change the password or if the password is the 
same? How can I save it? Is it correct to use 
password=db2.auth_user.password.validate(myPassword)[0]?

Regards.


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to